[Bug 24278] New: Transparent PNG are shown inverted by applications compiled with Lazarus
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(a)winehq.org ReportedBy: alejandro.lavarello(a)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.
http://bugs.winehq.org/show_bug.cgi?id=24278 --- Comment #1 from Alejandro Lavarello <alejandro.lavarello(a)gmail.com> 2010-09-05 09:42:37 CDT --- Created an attachment (id=30579) --> (http://bugs.winehq.org/attachment.cgi?id=30579) Same problem in WineXO -- 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.
http://bugs.winehq.org/show_bug.cgi?id=24278 --- Comment #2 from Alejandro Lavarello <alejandro.lavarello(a)gmail.com> 2010-09-05 09:43:50 CDT --- Created an attachment (id=30580) --> (http://bugs.winehq.org/attachment.cgi?id=30580) In Windows XP, no problem. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=24278 --- Comment #3 from Alejandro Lavarello <alejandro.lavarello(a)gmail.com> 2010-09-05 09:48:02 CDT --- Created an attachment (id=30581) --> (http://bugs.winehq.org/attachment.cgi?id=30581) The Lazarus project for compiling test program -- 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.
http://bugs.winehq.org/show_bug.cgi?id=24278 Alejandro Lavarello <alejandro.lavarello(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30578|Even at design time, |A Lazarus application shows description|Lazarus shows inverted the |inverted the PNG in Wine. |PNG in Wine. | -- 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.
http://bugs.winehq.org/show_bug.cgi?id=24278 Dmitry Shachnev <Mitya57(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Mitya57(a)gmail.com --- Comment #4 from Dmitry Shachnev <Mitya57(a)gmail.com> 2010-09-05 09:50:54 CDT --- *** Bug 24277 has been marked as a duplicate of this bug. *** -- 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.
http://bugs.winehq.org/show_bug.cgi?id=24278 --- Comment #5 from Alejandro Lavarello <alejandro.lavarello(a)gmail.com> 2010-09-05 09:51:03 CDT --- Created an attachment (id=30582) --> (http://bugs.winehq.org/attachment.cgi?id=30582) Lazarus IDE exhibit this problem at design time in Wine -- 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.
http://bugs.winehq.org/show_bug.cgi?id=24278 Andrew O. Shadoura (I DO NOT USE COMPIZ) <bugzilla(a)tut.by> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla(a)tut.by -- 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.
http://bugs.winehq.org/show_bug.cgi?id=24278 Marc Weustink <marc(a)freepascal.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marc(a)freepascal.org --- Comment #6 from Marc Weustink <marc(a)freepascal.org> 2010-09-08 18:32:23 CDT --- The pasted description is what I remembered when I implemented this. I've written a small example showing the source of the problem. On the windows GetDIBits ignores the sign of Info.biHeight while WINE doesnt. Output on Windows (XP): pix 1: 0x00000001 pix 2: 0x00000001 pix 3: 0x00000003 pix 4: 0x00000003 Output on WINE (wine-1.2.0-2.fc13.i686): pix 1: 0x00000001 pix 2: 0x00000003 pix 3: 0x00000001 pix 4: 0x00000003 -- 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.
http://bugs.winehq.org/show_bug.cgi?id=24278 --- Comment #7 from Marc Weustink <marc(a)freepascal.org> 2010-09-08 18:35:17 CDT --- Created an attachment (id=30641) --> (http://bugs.winehq.org/attachment.cgi?id=30641) Sample source + exe showing problem -- 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.
http://bugs.winehq.org/show_bug.cgi?id=24278 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, testcase -- 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.
http://bugs.winehq.org/show_bug.cgi?id=24278 --- Comment #8 from Marc Weustink <marc(a)freepascal.org> 2010-09-09 04:13:08 CDT --- On second thought.... This might be a issue, but isn't the issue for lazarus. The correct pixels are returned for a positive Info.biHeight, so that can't be the case. To be continued.... (and I need to install 1.3.2) -- 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.
http://bugs.winehq.org/show_bug.cgi?id=24278 --- Comment #9 from Alejandro Lavarello <alejandro.lavarello(a)gmail.com> 2010-09-09 12:53:01 CDT --- Marc, Ok, is not the Lazarus problem, but... why only occurs with transparent PNG and not with opaque PNG or Windows BMP files??? -- 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.
http://bugs.winehq.org/show_bug.cgi?id=24278 --- Comment #10 from Marc Weustink <marc(a)freepascal.org> 2010-09-09 14:00:56 CDT --- 32bpp bmp files with alpha channel suffer from the same problem. The point is that alpha images in lazarus are not premultiplied, while the AlphaBlend() function requires a premultiplied bitmap. So I need to premultiply all pixels. Therefore I need the pixels of the bitmap. I need the direction of the scanlines in order to get the sourcerectangle of the image we want to alphablend -- 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.
http://bugs.winehq.org/show_bug.cgi?id=24278 --- Comment #11 from Marc Weustink <marc(a)freepascal.org> 2010-09-13 18:25:44 CDT --- Created an attachment (id=30739) --> (http://bugs.winehq.org/attachment.cgi?id=30739) Sample source + exe showing problem with DIBsection while then bitmap_dir example (attachment 30641) still shows an incompatibility with windows (wine 1.3.2), it is not the source of the reversed Lazarus images. In that example the source bitmap was based on CreateDIBitmap(), which is not the type used for bitmaps in Lazarus. The bitmap_dir_2 example is based on CreateDIBSection(). This shows the lazarus problem. This example returns the wrong scanline for top to bottom bitmaps. output on windows XP: test 1: 0x00000001 test 2: 0x00000001 test 3: 0x00000003 test 4: 0x00000003 output on wine 1.3.2: test 1: 0x00000001 test 2: 0x00000001 test 3: 0x00000001 test 4: 0x00000001 -- 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.
http://bugs.winehq.org/show_bug.cgi?id=24278 Jack Edmonds <pocketcookies2(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pocketcookies2(a)gmail.com -- 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.
http://bugs.winehq.org/show_bug.cgi?id=24278 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx(a)gmail.com --- Comment #12 from Bruno Jesus <00cpxxx(a)gmail.com> 2011-10-02 11:49:57 CDT --- Output in latest git: winefree(a)ACER:/home/bjesus/Downloads$ wine project2.exe pix 1: 0x00000001 pix 2: 0x00000001 pix 3: 0x00000003 pix 4: 0x00000003 winefree(a)ACER:/home/bjesus/Downloads$ wine project3.exe test 1: 0x00000001 test 2: 0x00000001 test 3: 0x00000003 test 4: 0x00000003 It seems fixed to me. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=24278 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED --- Comment #13 from Austin English <austinenglish(a)gmail.com> 2011-10-03 13:33:45 CDT --- (In reply to comment #12)
Output in latest git:
winefree(a)ACER:/home/bjesus/Downloads$ wine project2.exe pix 1: 0x00000001 pix 2: 0x00000001 pix 3: 0x00000003 pix 4: 0x00000003
winefree(a)ACER:/home/bjesus/Downloads$ wine project3.exe test 1: 0x00000001 test 2: 0x00000001 test 3: 0x00000003 test 4: 0x00000003
It seems fixed to me.
Fixed. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=24278 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #14 from Alexandre Julliard <julliard(a)winehq.org> 2011-10-10 13:13:32 CDT --- Closing bugs fixed in 1.3.30. -- 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.
participants (1)
-
wine-bugs@winehq.org