On Wed, 6 Dec 2006, Frank Richter wrote:
When libpng is available, support for writing out 24 and 32bpp icons is added, which are written out as PNGs. Also changed wineshelllink to support both xpm and png extensions for icons.
Some parts based on an older patch by Vitaliy Margolen.
The thing that blocked this patch from being applied last time is that, if I remember correctly, Alexandre would like the PNG functionality to be added to the IPicture implementation in dlls/oleaut32/olepicture.c. Then winemenubuilder would use this interface to save the icon into the proper format.
It's easy to see where the code should go to extend this interface to support loading PNG files as it already supports loading Gif and Jpeg files. However I'm fuzzy on how one would use this interface to specify the format to use for saving. Maybe by defining Wine-specific PICTYPE_XXX values? But that would not work on Windows...
The other semi-related part would be to use ExtractAssociatedIcon() instead of extract_icon32(), though I'm not sure that's compatible with trying to select the 'best' icon size/color depth.
I'm pretty sure my memory mangled some of this. Hopefully Alexandre will clarify things.
On 06.12.2006 20:01, Francois Gouget wrote:
I'm pretty sure my memory mangled some of this. Hopefully Alexandre will clarify things.
Yeah, I'm also wondering how an acceptable PNG icon support would look like.
-f.r.
On 06.12.2006 20:01, Francois Gouget wrote:
The thing that blocked this patch from being applied last time is that, if I remember correctly, Alexandre would like the PNG functionality to be added to the IPicture implementation in dlls/oleaut32/olepicture.c. Then winemenubuilder would use this interface to save the icon into the proper format.
It's easy to see where the code should go to extend this interface to support loading PNG files as it already supports loading Gif and Jpeg files. However I'm fuzzy on how one would use this interface to specify the format to use for saving. Maybe by defining Wine-specific PICTYPE_XXX values? But that would not work on Windows...
Looking at IPicture, it just doesn't seem to be made for conversions. You can save an image in the "original format", but that's about it for image format support. Using IPicture to write a PNG seems like trying to fit a square peg into a round hole. Ideas like abusing PICTTYPE don't help to relieve that feeling.
-f.r.