One interesting problem. I was building custom colormaps. It so turns out that the colormap vector cannot be more than 256 rows. Example, if you want 512 levels of gray to be your colormap, it just would not work. Anybody think I am doing something stupid? I could not find any documentation that says that I am limited to only 256 colors.