[Bug 44409] New: png with indexed colors and alpha miss the alpha channel on loading
https://bugs.winehq.org/show_bug.cgi?id=44409 Bug ID: 44409 Summary: png with indexed colors and alpha miss the alpha channel on loading Product: Wine Version: 3.0 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdiplus Assignee: wine-bugs(a)winehq.org Reporter: nikolaysemenkov(a)gmail.com Distribution: --- Created attachment 60332 --> https://bugs.winehq.org/attachment.cgi?id=60332 1 bit png with alpha The 1bit png with alpha is attached. Wine loads it as PixelFormat1bppIndexed, which means no alpha preserved Windows loads it as PixelFormat32bppARGB which means windows does conversion because pixelformat is not match to PixelFormat1bppIndexed(because otherwise it lost alpha). The same happens for 8 bit png with alpha. Could you please add supporting loading alpha channel for 1 and 8 bit pngs in the same way as windows does, ie convert to PixelFormat32bppARGB. Thanks. The func to load png: HBITMAP loadBitmap(const wchar_t* path) { HBITMAP tBmp = NULL; ULONG_PTR token = 0; Gdiplus::GdiplusStartupInput input = NULL; Gdiplus::GdiplusStartup(&token, &input, NULL); if (token != 0) { Gdiplus::Bitmap* bmp = new Gdiplus::Bitmap(path); bmp->GetHBITMAP(Gdiplus::Color::Transparent, &tBmp); delete bmp; Gdiplus::GdiplusShutdown(token); } return tBmp; } -- 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=44409 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Nikolay Sivov <bunglehead(a)gmail.com> --- Can confirm, tested on Windows 10. -- 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=44409 Sagawa <sagawa.aki+winebugs(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sagawa.aki+winebugs(a)gmail.c | |om --- Comment #2 from Sagawa <sagawa.aki+winebugs(a)gmail.com> --- Created attachment 62716 --> https://bugs.winehq.org/attachment.cgi?id=62716 WOLF RPG Editor (Editor.exe) screenshot on Wine 3.0.3 WOLF RPG Editor (Editor.exe) 2.24 suffers from this issue. Please look at the attachment. In the picture, trees are painted in strange color as if cherry blossoms. In the native, trees are green. I inspected the issue and found out that map chip image (Data\MapChip\[Base]BaseChip_pipo.png, which has tRNS chunk) is loaded as PixelFormat8bppIndexed instead of PixelFormat32bppARGB. Editor.exe seems not to handle 8bppIndexed image well. I'm preparing a patch for this issue. -- 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=44409 --- Comment #3 from Sagawa <sagawa.aki+winebugs(a)gmail.com> --- Created attachment 62717 --> https://bugs.winehq.org/attachment.cgi?id=62717 WOLF RPG Editor screenshot on Windows 7 -- 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=44409 --- Comment #4 from Sagawa <sagawa.aki+winebugs(a)gmail.com> --- This issue should be fixed by 748a246a8de172678a6e8b779b9378cf5fd0aca1. -- 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=44409 Gijs Vermeulen <gijsvrm(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED Fixed by SHA1| |748a246a8de172678a6e8b779b9 | |378cf5fd0aca1 --- Comment #5 from Gijs Vermeulen <gijsvrm(a)gmail.com> --- Since Sagawa confirmed the issue to be present and confirmed it to be fixed, I'm going to mark this FIXED. OP, if you are still able to reproduce the issue, feel free to reopen this bug. Fixed by: 748a246a8de172678a6e8b779b9378cf5fd0aca1 -- 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=44409 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #6 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 3.21. -- 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=44409 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |3.0.x -- 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=44409 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|3.0.x |--- --- Comment #7 from Michael Stefaniuc <mstefani(a)winehq.org> --- Removing the 3.0.x milestone from bug fixes included in 3.0.5. -- 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