Updates (see post #2 for bug descriptions):
31 Aug 14: Fixed JPG related GDI+ bug
Higher quality images often have a color management profile (ICM/ICC) embedded into their file. These embedded profiles can be retrieved from GDI+ most times. Not many image formats support embedded profiles, but these do per ICC.org: png, tif, jpg & gif.
When embedded, the image's creator provided it so that it can be used to reproduce the image on any monitor/printer in the colors that the creator intended. By ignoring the profile, what you get is not what the creator intended. Sometimes it can be radically different. Images without ICC profiles are at the mercy of the rendering application. GDI+ does a fair job without embedded profiles, but its hands are tied when best-guessing how to interpret the colors.
Windows provided color management for quite awhile now, but it is the application's responsibility to apply it. The flat GDI+ API wrapper doesn't support color management directly. But with the use of Windows APIs we can still use GDI+ and apply color management
For a project that doesn't rely on GDI+ for displaying images with embedded ICC profiles, see Tanner's work here. This project is not meant to be competitive with Tanner's hDC-based solution, it is provided as a workaround for those that exclusively use GDI+ for image rendering/processing, no device contexts used in transformations. I started this about 2 years ago & lost interest. Can rest easier now :)
This sample project uses Windows to help transform colors, but the result is maintained and used by GDI+. From the sample screenshot, you can see a radical example along with a real-world example of how color management can improve what is displayed. And this sample project may include the only VB6 code that processes a GIF embedded ICC profile instead of ignoring them. To be fair, embedded GIFs are really hard to find.
To find other images to play with, google for: color profile test
From time to time, will update this as needed
Request. If anyone would like to upload an 8 bit grayscale JPG, TIFF or PNG with the appropriate ICC profile, embedded or not, please do so. I'd like to examine them. Currently, processing 8 bit images other than GIF is turned off in the code.
31 Aug 14: Fixed JPG related GDI+ bug
Higher quality images often have a color management profile (ICM/ICC) embedded into their file. These embedded profiles can be retrieved from GDI+ most times. Not many image formats support embedded profiles, but these do per ICC.org: png, tif, jpg & gif.
When embedded, the image's creator provided it so that it can be used to reproduce the image on any monitor/printer in the colors that the creator intended. By ignoring the profile, what you get is not what the creator intended. Sometimes it can be radically different. Images without ICC profiles are at the mercy of the rendering application. GDI+ does a fair job without embedded profiles, but its hands are tied when best-guessing how to interpret the colors.
Windows provided color management for quite awhile now, but it is the application's responsibility to apply it. The flat GDI+ API wrapper doesn't support color management directly. But with the use of Windows APIs we can still use GDI+ and apply color management
For a project that doesn't rely on GDI+ for displaying images with embedded ICC profiles, see Tanner's work here. This project is not meant to be competitive with Tanner's hDC-based solution, it is provided as a workaround for those that exclusively use GDI+ for image rendering/processing, no device contexts used in transformations. I started this about 2 years ago & lost interest. Can rest easier now :)
This sample project uses Windows to help transform colors, but the result is maintained and used by GDI+. From the sample screenshot, you can see a radical example along with a real-world example of how color management can improve what is displayed. And this sample project may include the only VB6 code that processes a GIF embedded ICC profile instead of ignoring them. To be fair, embedded GIFs are really hard to find.
To find other images to play with, google for: color profile test
From time to time, will update this as needed
Request. If anyone would like to upload an 8 bit grayscale JPG, TIFF or PNG with the appropriate ICC profile, embedded or not, please do so. I'd like to examine them. Currently, processing 8 bit images other than GIF is turned off in the code.