Bug 162334

Summary: image viewer doesn't support Windows BMP with negative height (top-to-bottom [reversed] line order)
Product: [I don't know] kde Reporter: Colin S. Miller <kde>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: grundleborg
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Image of Tux, using MS Windows BMP, negative height

Description Colin S. Miller 2008-05-19 22:57:00 UTC
Version:            (using KDE 3.5.8)
Installed from:    Debian stable Packages

http://www.fileformat.info/format/bmp/egff.htm 
says this
  Width and Height are the width and height of the image in pixels,
  respectively.  If Height is a positive number, then the image is a
  "bottom-up" bitmap with the origin in the lower-left corner. If
  Height is a negative number, then the image is a "top-down" bitmap
  with the origin in the upper-left corner. Width does not include any
  scan-line boundary padding.

Both konqueror in ViewMode->photobook, and KImageMap editor 
display a black square when the height is negative.

This is probably a bug in a common library, possibly in QT.
Comment 1 Colin S. Miller 2008-05-19 23:16:43 UTC
Forgot to say, I'm using KDE 3.5.7. This wasn't on the drop-down list.
Comment 2 George Goldberg 2008-06-30 03:17:34 UTC
Could you please attach a sample bitmap file which triggers this bug for testing.
Comment 3 Colin S. Miller 2008-06-30 23:22:49 UTC
Created attachment 25745 [details]
Image of Tux, using MS Windows BMP, negative height

This is a MS Windows BMP image, with negative height.
58x-64x8bpp.
The source was /usr/share/apps/amor/pics/static/tux.png, dealphaed and inverted
in Gimp, and the height negated in a hex editor.

The original image that I found this bug with was generated by a custom tool
used by my work, and so can't be attached here.
Comment 4 George Goldberg 2008-08-04 23:10:38 UTC
This works fine in KDE 4 applications.