[Bug 38622] New: PixelFormat32bppARGB != PixelFormat8bppIndexed
https://bugs.winehq.org/show_bug.cgi?id=38622 Bug ID: 38622 Summary: PixelFormat32bppARGB != PixelFormat8bppIndexed Product: Wine Version: 1.6.2 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: mathieu.malaterre(a)gmail.com Distribution: --- Created attachment 51527 --> https://bugs.winehq.org/attachment.cgi?id=51527 source code For some reason GDI+ on windows returns PixelFormat32bppARGB instead of PixelFormat8bppIndexed for a grayscale PNG file (JPEG & TIFF seems consistant though). It would be nice if behavior would be consistant across implementation. Compile and run attachements.
From Linux:
$ ./gdidump.exe input.png fixme:wincodecs:PngDecoder_Block_GetCount 0x142e30,0x61f708: stub Width x Height: 512 512 PixelFormat8bppIndexed found !
From Windows:
gdidump.exe input.png Width x Height: 512 512 PixelFormat32bppARGB found !
-- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38622 --- Comment #1 from Mathieu Malaterre <mathieu.malaterre(a)gmail.com> --- Created attachment 51528 --> https://bugs.winehq.org/attachment.cgi?id=51528 input.png image -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38622 Mathieu Malaterre <mathieu.malaterre(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mathieu.malaterre(a)gmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38622 --- Comment #2 from Mathieu Malaterre <mathieu.malaterre(a)gmail.com> --- Well technically the windows implementation is seriously bogus here. Feel free to close as invalid, your implementation is actually superior ! -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38622 --- Comment #3 from Ken Thomases <ken(a)codeweavers.com> --- Curious. OS X's CGImageSource API does a similar thing. It was actually considered an obstacle to using it as a back-end for windowscodecs. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38622 --- Comment #4 from Mathieu Malaterre <mathieu.malaterre(a)gmail.com> --- I've filed a bug upstream also: http://connect.microsoft.com/VisualStudio/feedback/details/1355778/pixelform... But really there is nothing wrong with this approach, this is legal for GDI+ to load a single component grayscale PNG file as an ARGB. So I'd like to remove my comment #2. Would it be possible to have a consistant behavior in wine instead ? Thanks -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38622 --- Comment #5 from Mathieu Malaterre <mathieu.malaterre(a)gmail.com> --- After digging in the code here is what I found out (http://stackoverflow.com/a/30396519/136285): For Grayscale PNG: PixelFormat is: PixelFormat32bppARGB ImageFlagsColorSpaceRGB is not set For RGB PNG: PixelFormat is: PixelFormat24bppRGB ImageFlagsColorSpaceRGB is set For RGBA PNG: PixelFormat is: PixelFormat32bppARGB ImageFlagsColorSpaceRGB is set -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38622 Michael Müller <michael(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michael(a)fds-team.de -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38622 --- Comment #6 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- Please retest with recent (preferably latest git) version of Wine. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38622 --- Comment #7 from Mathieu Malaterre <mathieu.malaterre(a)gmail.com> --- Same exact behavior from 1.7.43 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38622 Dmitry Timoshkov <dmitry(a)baikal.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|PixelFormat32bppARGB != |gdiplus should return |PixelFormat8bppIndexed |PixelFormat32bppARGB | |instead of | |PixelFormat8bppIndexed for | |a grayscale PNG file --- Comment #8 from Dmitry Timoshkov <dmitry(a)baikal.ru> --- This needs to be tested on both WIC and gdiplus sides. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38622 Sebastian Lackner <sebastian(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |STAGED CC| |dmitry(a)baikal.ru, | |erich.e.hoover(a)wine-staging | |.com, sebastian(a)fds-team.de Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/gdiplus-Graysc | |ale_PNG -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38622 David Korth <gerbilsoft(a)gerbilsoft.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gerbilsoft(a)gerbilsoft.com --- Comment #9 from David Korth <gerbilsoft(a)gerbilsoft.com> --- Created attachment 55621 --> https://bugs.winehq.org/attachment.cgi?id=55621 Sample grayscale PNG image. I've been getting slightly different behavior on wine-1.9.16 (and wine-1.9.18). I have a grayscale PNG image, and wine's gdiplus is actually converting it to ARGB32, like the Windows GDI+ does; however, it's also reporting image flags of 0x13042. This indicates the image is grayscale (0x40), and it has an alpha channel (0x02). The alpha value is bogus; on Windows XP, it returns 0x40. I attached a sample image that I'm using in a test suite with GDI+ as a backend on Windows. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38622 David Korth <gerbilsoft(a)gerbilsoft.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55621|0 |1 is obsolete| | --- Comment #10 from David Korth <gerbilsoft(a)gerbilsoft.com> --- Created attachment 55622 --> https://bugs.winehq.org/attachment.cgi?id=55622 Sample grayscale PNG image. I uploaded the wrong image; that one actually has an alpha channel. This one does not, and is the one that GDI+ was incorrectly reporting as having alpha. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38622 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |gdiplus -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38622 Sebastian Lackner <sebastian(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|STAGED |NEW --- Comment #11 from Sebastian Lackner <sebastian(a)fds-team.de> --- This should be fixed with 8c593bd37ad1177144d720d17b6b706d2ee619f1 and previous commits, please retest. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38622 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |8c593bd37ad1177144d720d17b6 | |b706d2ee619f1 Status|NEW |RESOLVED --- Comment #12 from Nikolay Sivov <bunglehead(a)gmail.com> --- Marking fixed, test program output matches Windows now. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38622 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #13 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 2.17. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org