@PeridexisErrant: Sweet. That editing blueprints page is exactly what I needed. It looks like multilevel designations will be pretty trivial, it's just a matter of figuring out how to do the UI, which is probably the opposite of trivial. But I'm sure I can work something out.



@Astarch: It's an arbitrary limit. I noticed a slowdown in the UI with unlimited colors. Also, 24 bit images are supported. It's just that when you have less than a full 8 bytes per color (ie. 16 bit and lower images), you have to change the algorithm for the color selection of each pixel, which IMO is more effort than its worth to implement, because seriously, who is really going to need the space savings of creating a 16 bit image vs 24 bits?



IIRC (I don't have the source handy, as I mentioned before I'm still on vacation) .NET has a pixelcopy function which stores the image as a byte array with each pixel as 4 bytes of RGBA (or ARGB I don't recall which) or if there is no alpha channel 3 bytes of RGB -- which are converted to a hexadecimal value which is used for doing all the heavy lifting. Additionally there is a function which automagically creates a list of colors from the image palette which dynamically generates the designation inputs.



In retrospect the color limit is a poor workaround for the actual problem. I was trying to protect people from loading jpgs of millions of colors and freezing the program. While testing I opened up some random .jpg of blood soaked icebergs and polar bears and figured someone out there would accidentally do something similar with their pictures of cats or boobies or whatever else they may have handy. I can probably increase the limit on colors, and also add a limit for the image dimensions, 2 or 3k square pixels maybe?



edit: also, thanks for the link. I actually just saw your program while searching for more information about quickfort earlier today on the forums, and I've added it to my list of things to look at when I get back home.