The attached project shows off some of the parser/manager class' abilities. Compatible all the way back to Win95.
This project was created so one can work strictly with 32 bit images, thus, enabling per-pixel alphablending. Unicode is supported for drag & drop, copy & paste, and loading of files. The parsers and the entire project contains tons of remarks to help follow the code.
The parsers can handle bmp, ico/cur, jpg, gif, png, wmf/emf, tga, and if GDI+ exists on the system, tiff. It can convert any of the above to jpg, bmp, tga, gif or png (see disclaimer below). Also Vista & XP icons are supported. Did you know that Vista icons can contain PNG images? No problem. Even pre-multiplied bitmaps are supported, should you have any of those.
GDI+ if installed will be used unless specifically told not to. Many graphics manipulation routines are included, such as rotation, grayscaling, mirroring, shading, scaling, and so much more. Classes can be added to new projects or even added to a DLL should you desire.
Included with the project is an RTF file documenting all the properities, change history, and some FAQs. Most recent changes are shown in post #2 below.
Disclaimers.
1. PNG can be read without use of any 3rd party DLLs. However, it cannot be written without one of these 2 DLLs: GDI+ (installed on XP & Vista, can be downloaded for other O/S), or zLIB which is compatible with all O/S. In the c32bppDIB class are links where you can download these DLLs should you want/need them.
2. TIFFs can ony be read if GDI+ is installed. Internally, TIFFs are converted to PNG format to enable further manipulation.
3. Parts of this project exist in other projects I may have posted. Do not assume the code within this project and those others are identical, they are not. Each project's code is customized for that particular project.
Two zip files are provided. One with all the classes and sample project. Another with the sample project's resource file and the aforementioned RTF document. You can't really run the project without downloading both
Last edited by LaVolpe; Feb 16th, 2009 at 09:45 PM.
Reason: modified zip contents
Insomnia is just a byproduct of, "It can't be done"
The project has been modified to fix some logic errors.
1. When manually parsing PNGs (without use of GDI+), the parser could fail to correctly recognize the simple transparency index in grayscale PNGs -- fixed
2. When parsing icons, the parser could fail to properly identify some transparency in the mask image -- fixed
Insomnia is just a byproduct of, "It can't be done"