View Issue Details

IDProjectCategoryView StatusLast Update
0017299LazarusLCLpublic2012-03-17 20:33
ReporterAlejandro Lavarello Assigned ToZeljan Rikalo  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
Product Version0.9.29 (SVN) 
Summary0017299: TImage shows transparent PNG vertically mirrored in Wine
DescriptionThis occurs always with all transparent PNG images. The same image is showed
correctly by Firefox in Wine 1.2 and in WineXO.

But, when one attach a PNG picture with transparent background,
to a Image control, at runtime the picture
shows OK in Windows XP, but is vertically mirrored in Wine.
Additional InformationTested in Wine 1.2 in Puppy Linux 5.
Tested in WineXO in XO-1 with Fedora + Sugar.
(WineXO site: http://wiki.winehq.org/SugaredWine )

Compiled with Lazarus 0.9.29, SVN:26494 , FPC: 2.4.3 in
Windows XP SP3 in Spanish.
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetWin32/Win64
Attached Files

Activities

2010-08-29 17:44

 

Alejandro Lavarello

2010-08-29 17:48

reporter   ~0040598

I can send the complied .exe in RAR format (2,2 MB) if you want.

Sven Barth

2010-08-29 18:03

manager   ~0040599

Semms to have been reported to the Wine guys some time ago as well:
http://bugs.winehq.org/show_bug.cgi?id=10885

Regards,
Sven

Marc Weustink

2010-08-30 01:15

administrator   ~0040615

(here my answer on the forum again)

This is IMO a bug in wine.

The problem is that there is no windows function which tells me if the bitmap data in a dibsection is upside down or not. So I use a trick by inverting the first databyte. if the topleft pixel is not changed, the data is upside down. Somehow wine fails this check resulting in a wrong orientation

Alejandro Lavarello

2010-08-30 14:28

reporter   ~0040646

The PNG transparent images are showed correctly by Firefox, XNView, IrfanView and AbiWord in WineXO and in Wine 1.2 .
I Think that is a Lazarus problem, because is the unique with this problem in Wine.

Sven Barth

2010-08-30 14:36

manager   ~0040647

@Mark:
Do you think that you can report this to the Wine devs so that they know why the images are flipped and so might be able to fix it?

Regards,
Sven

Alejandro Lavarello

2010-08-31 04:06

reporter   ~0040668

Last edited: 2010-08-31 04:44

Sven, I will report this to Wine, too.
But, can you fix the Lazarus bug? Because Lazarus is **the only** application with this problem. And this Lazarus bug is since 2007 without correction.

Marc have implemented PNG transparent in a wrong way, in my humble opinion: I am not a develper, only a newbie. I appreciate the work of Marc, but he have missing
some thing.

No other application has this bug in Wine.

Sven Barth

2010-08-31 11:52

manager   ~0040675

@Alejandro:
It works on Windows, so it is a bug in Wine and not in Lazarus. Perhaps Lazarus (and the LCL) is one of the few applications that checks it that way.

@Mark:
I've found an interesting comment in the documentation of CreateDIBSection ( http://msdn.microsoft.com/en-us/library/dd183494%28VS.85%29.aspx ):
"
DIB sections are a product of OS/2. If the specified DIB section height is positive, the 0,0 coordinate is the bottom-left pixel, which is how it is in OS/2. If the DIB section is negative, the 0,0 coordinate is the top-left pixel, which is how it is in Windows. Most implementations follow the OS/2 implementation.
"

Maybe you can use this information to generate a better check? (But the bug should be reported to Wine nevertheless)

Regards,
Sven

Felipe Monteiro de Carvalho

2010-09-01 22:02

developer   ~0040721

Link to related discussion in the forum: http://www.lazarus.freepascal.org/index.php/topic,10353.0.html

2010-09-03 05:53

 

Lazarus-App-In-Windows-XP.PNG (124,197 bytes)   
Lazarus-App-In-Windows-XP.PNG (124,197 bytes)   

2010-09-03 05:54

 

Lazarus-App-In-WineXO.PNG (110,238 bytes)   
Lazarus-App-In-WineXO.PNG (110,238 bytes)   

2010-09-03 05:55

 

Marc Weustink

2010-09-16 23:41

administrator   ~0041146

Last edited: 2010-09-16 23:42

@sven, as I wrote earlier, the info about a dib results always in a positive height (yes, msdn tells different) so I need alternatives.

In the meantime I wrote a simple lcl independent, console only testcase indicating the problem (in wine 1.3.2). Now wait till it gets fixed.

Sven Barth

2010-09-17 17:20

manager   ~0041169

@Marc:
Did you ever found a DIB that has negative height and which behaves like one with positive height? (I'm curious here)

But the bug in Wine should nevertheless get fixed. :)

Regards,
Sven

Mattias Gaertner

2010-09-18 17:44

manager   ~0041181

It is fixed:
http://www.winehq.org/announce/1.3.2

Sven Barth

2010-09-19 10:20

manager   ~0041196

No it isn't. The old bug report was closed and the report where Marc has uploaded an example ( http://bugs.winehq.org/show_bug.cgi?id=24278 ) is now the main one.

Regards,
Sven

Sven Barth

2012-03-17 20:14

manager   ~0057789

I just tested this today, because someone had remarked on the ReactOS forums that ReactOS has the same problem ( http://www.reactos.org/forum/viewtopic.php?f=2&t=10972&start=15#p90943 - the author is refering to a screenshot on the previous page): The problem is now fixed in Wine 1.4 (the linked Wine bug is also marked as fixed). So this issue can be closed with "No change required" (I won't do it, because I'm "only" a compiler developer ;) ).

Regards,
Sven

Zeljan Rikalo

2012-03-17 20:32

developer   ~0057791

As Sven mentioned, it's fixed in wine 1.4 . Please close.

Issue History

Date Modified Username Field Change
2010-08-29 17:44 Alejandro Lavarello New Issue
2010-08-29 17:44 Alejandro Lavarello File Added: TransparentPNGShowedInvertedInWine.rar
2010-08-29 17:44 Alejandro Lavarello Widgetset => Win32/Win64
2010-08-29 17:48 Alejandro Lavarello Note Added: 0040598
2010-08-29 18:03 Sven Barth Note Added: 0040599
2010-08-30 01:15 Marc Weustink LazTarget => -
2010-08-30 01:15 Marc Weustink Note Added: 0040615
2010-08-30 01:15 Marc Weustink Status new => acknowledged
2010-08-30 14:28 Alejandro Lavarello Note Added: 0040646
2010-08-30 14:36 Sven Barth Note Added: 0040647
2010-08-31 04:06 Alejandro Lavarello Note Added: 0040668
2010-08-31 04:41 Alejandro Lavarello Note Edited: 0040668
2010-08-31 04:44 Alejandro Lavarello Note Edited: 0040668
2010-08-31 11:52 Sven Barth Note Added: 0040675
2010-09-01 22:02 Felipe Monteiro de Carvalho Note Added: 0040721
2010-09-03 05:53 Alejandro Lavarello File Added: Lazarus-App-In-Windows-XP.PNG
2010-09-03 05:54 Alejandro Lavarello File Added: Lazarus-App-In-WineXO.PNG
2010-09-03 05:55 Alejandro Lavarello File Added: Lazarus-App-In-Wine1.2-Puppy-Linux-5.PNG
2010-09-16 23:41 Marc Weustink Note Added: 0041146
2010-09-16 23:42 Marc Weustink Note Edited: 0041146
2010-09-17 17:20 Sven Barth Note Added: 0041169
2010-09-18 17:44 Mattias Gaertner Note Added: 0041181
2010-09-19 10:20 Sven Barth Note Added: 0041196
2012-03-17 20:14 Sven Barth Note Added: 0057789
2012-03-17 20:32 Zeljan Rikalo Status acknowledged => resolved
2012-03-17 20:32 Zeljan Rikalo Resolution open => no change required
2012-03-17 20:32 Zeljan Rikalo Assigned To => Zeljan Rikalo
2012-03-17 20:32 Zeljan Rikalo Note Added: 0057791