BW bitmap in gtk and invalid Description.LineEnd
Original Reporter info from Mantis: Petr-K
-
Reporter name:
Original Reporter info from Mantis: Petr-K
- Reporter name:
Description:
I use TLazIntfImage to access color data in bitmap by TLazIntfImage.Colors[x, y].
In case of bw bitmap (1bbp) and image width not multiply of 32, result was unsynchronized (scanlines shifted).
Steps to reproduce:
In the attachment is problematic image.
Additional information:
This patch solves my problem:
Index: lcl/interfaces/gtk/gtkwidgetset.inc
===================================================================
--- lcl/interfaces/gtk/gtkwidgetset.inc (revision 23714)
+++ lcl/interfaces/gtk/gtkwidgetset.inc (working copy)
@@ -1861,7 +1861,7 @@
if IsBitmap
then begin
- ADesc.LineEnd := rileByteBoundary;
+ ADesc.LineEnd := rileDWordBoundary;
ADesc.RedPrec := 1;
ADesc.RedShift := 0;
end
Mantis conversion info:
- Mantis ID: 15893
- OS: Linux 2.6.26-2-686 #1 (closed) SMP
- Build: revision 23714
- Version: 0.9.28.3 (SVN)
- Monitored by: » Petr-K (Petr-K)