[Digikam-devel] [Bug 276096] PGF images not shown if zoom is set to 100%
Marcel Wiesweg
marcel.wiesweg at gmx.de
Mon Jul 11 18:03:45 BST 2011
https://bugs.kde.org/show_bug.cgi?id=276096
--- Comment #13 from Marcel Wiesweg <marcel wiesweg gmx de> 2011-07-11 17:03:45 ---
This one was difficult to debug.
At the root, there is a libpgf regression: When the image has no alpha
channel, the alpha byte is set to 0, instead of 255.
(we initialize the memory with 0xFF, which seems unnecessary, given that
libpgf seems to fully write the memory including the alpha byte).
Afterwards, the story goes so that we see the problem only in a very specific
case:
Whenever we scale, the alpha byte is ignored because hasAlpha is false, so all
is well. At 100%, no scaling is done, and we pass the data as is to QImage and
then to QPixmap. QPixmap sees transparent pixels and produces a transparent
pixmap.
I will commit an optimization which as a side-effect fixes the problem here -
if alpha is false, the image is RGB32 and not ARGB32, which frees QPixmap from
scanning the image for transparent pixels.
but I think the underlying regression must be fixed in libpgf, it should
preferably write 255 to the alpha channel, or not touch the alpha channel (and
say so in the API docs)
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Digikam-devel
mailing list