Malcolm I was intrigued by these "extra" colors so I have done a bit more research. As I went through the image I stored the colors into an array and a cursor. I cross-checked the colors found with the 13 (15 incl balck and white) colors that I expected to get. The extra colors were all visually indistinguishable from black (and converting RGB to HSL found to have a luminance less than 40 - on a scale up to 255).
I began to suspect that these extra colors were coming from artifacts so I did another mod to store the pixel count for each color. Sure enough the extra colors all had a pixel count of 1 or 2. So now I can use the modified program, with a threshold pixel count, to give me a more realistic (if less accurate) color count than PaintShop ! This works for BMP, PNG and TIF. GIF is giving completely different results but I suspect that the algorithm I am using to get the colors from the image is not valid for GIF images. I still don't understand why (JPEG) lossy compression causes such a large increase in the number of reported colors but I am not really worried about that. Cheers Paul Malcolm Greene wrote: > Paul, > > Thanks for the explanation - seems like an interesting project. > > The JPG format stores your image with lossy compression so it will add > colors add it compresses your image. > > I'm not sure why PaintShopPro reports 40 vs. 15 colors. > > Malcolm > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

