> I was looking in to the overall architectural issues but have not had > the time to really hack on it recently. As far as I understand, the > current png support in wine's windowscodecs does not support creation > of a 32bpp image with transparency, unless I missed some commit > messages or totally misunderstood our discussions. I believe from my > reading native does support doing the conversions, saving the alpha > channel information, applying the masking, etc.
It's supported 32bpp with transparency from the start. The full list of supported writing formats is here: http://source.winehq.org/source/dlls/windowscodecs/pngformat.c#L680 GUID_WICPixelFormat32bppBGRA is the format you want, I think. You probably tried to use a format not on that list, which defaults to 24-bit. I'm not sure what the behavior should be in that case. > I was working on a patch for winemenubuilder so we would at least have > that part part done, even if it only spit out 24bpp images without > transparency but never got very far with it. If I recall correctly, > the current code parses the raw ico bitmapinfo, passes that to libpng, > applies the mask and generates the resulting image. I tried a few > different ways, using WIC to open a stream to the icon that was then > parsed by the icon decoder feeding the png encoder to generate the > image. I also tried using the existing parsing system, feeding that to > the bitmap decoder then the png encoder and never could get it to work > quite right. With the patch I had, the resulting png image was corrupt > possibly due to some RGB/BGR issue, I seem to recall Vincent > mentioning something about that as well. That's odd. Both WIC and winemenubuilder appear to be using BGR for 32-bit pixel formats and informing libpng of this . I don't know where you could be getting RGB pixels.
