[Bug 24278] New: Transparent PNG are shown inverted by applications compiled with Lazarus

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Sep 5 09:41:06 CDT 2010


http://bugs.winehq.org/show_bug.cgi?id=24278

           Summary: Transparent PNG are shown inverted by applications
                    compiled with Lazarus
           Product: Wine
           Version: 1.2-rc4
          Platform: x86
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: -unknown
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: alejandro.lavarello at gmail.com


Created an attachment (id=30578)
 --> (http://bugs.winehq.org/attachment.cgi?id=30578)
Even at design time, Lazarus shows inverted the PNG in Wine.

Applications that are compiled with Lazarus display transparent PNG images
upside down.
Tested in Wine 1.2 rc4 in Puppy Linux 5 and in WineXO.

The same executable shows OK in Windows.

A example executable showing the problem can be downloaded from:

http://freakshare.net/files/meqi0gmc/ImageMirroredInWine.rar.html

duplicated in this other link:

http://www.megaupload.com/?d=NVSAW5Y1

According to Marc Weustink, the Lazarus implementer of bitmap handling,
this can occur because:

"
Through the GetObject() function I get the BITMAP info of a given HBITMAP
If the HBITMAP was created as DIBsection, the BITMAP.bmBits will point to the
data of the bitmap. On "real" windows you are allowed to manipulate this data.

For these bmBits I want to know if they are bottom-up or top-down.

With the GetDIBits() function I request the first scanline/pixel in bottom-up
order (so it is the last line of the bitmap). I cannot compare it to the value
I found in bmBits, since top and bottom may have the same pixelvalue.

Now I invert the first pixel of bmBits and I request again the first scanline
in bottom-up order.

If the first pixel did change, then the data was bottom-up.
It the pixel didn't change, I was manipulating the top of the bitmap

There can be a few issues with wine:
1) bmBits points to a copy of the bitmap data
2) GetDIBits doesn't honor the requested scanline order (== doesn't reorder if
bottom-up is requested while the image is top-down)
3) Wine does report a negative height, and I think I request a bottom-up but I
get a top-down

"

(see 
http://www.lazarus.freepascal.org/index.php/topic,10353.0.html )

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
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