[Libreoffice-bugs] [Bug 141269] FILESAVE: PNG: Incorrect transparency after roundtrip

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Apr 14 20:03:17 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=141269

--- Comment #12 from Caolán McNamara <caolanm at redhat.com> ---
The icons in the sidebar in GTK3 are set by passing a block of png data to gtk
which them renders the png internally, so those showing broken to me indicates
that we didn't give them the correct png data, I feel there are a few separate
places not working.

so, currently internally in bitmap data we are supposed to be using opacity and
not transparency so a fully transparent pixel has an alpha of 0 ?

vcl/source/filter/png/PngImageReader.cxx:309 has:
  pScanAlpha[iAlpha++] = 0xFF - pRow[i + 3]
is that then an out of date conversion from opacity to transparency.
vcl/source/filter/png/pngwrite.cxx:566 has a matching:
  255 - mpMaskAccess->GetIndexFromData(pScanlineMask, nX)
to go the other direction
vcl/headless/svpgdi.cxx has some "make upper layers use standard alpha" places
where it does some toggling which might be wrong now (?)
if BitmapEx::AdjustTransparency input cTrans is transparency then should 
nNewTrans = nTrans + *pAScan convert *pAScan from opacity to transparency
before the addition ?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210414/3ca5f11c/attachment.htm>


More information about the Libreoffice-bugs mailing list