[Bug 44409] New: png with indexed colors and alpha miss the alpha channel on loading

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Jan 23 22:08:11 CST 2018


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 at winehq.org
          Reporter: nikolaysemenkov at 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.



More information about the wine-bugs mailing list