You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 16, 2018. It is now read-only.
Here's the whole file (cannot attach bmp files to Github issues):
begin 644 monochrome-negative-height.bmp
M0DVB`````````((```!L````!````/C___\!``$``````"`````3"P``$PL`
M``(````"````0D=2<P``````````````````````````````````````````
M``````````````````````(```````````````````#___\`````````````
;```````````````0````(````$````"`````
`
end
Some discoveries of the progress of the .bmp format:
Given this structure for the header of a .bmp file:
struct bmp_header {
char bfType1; /* The character 'B' */
char bfType2; /* The character 'M' */
u_short bfReserved1; /* Unused - must be zero */
u_short bfReserved2; /* Unused - must be zero */
u_int bfOffBits; /* Offset to start of pixel data */
u_int biSize; /* Header size */
...
}
xv recognizes three possible values for biSize: 12, 40, 64 for WIN_OS2_OLD, WIN_NEW, and OS2_NEW respectively. Any other value indicates the old bitmap format. This is why xv doesn't like the file I got from apache.org. It looks like, to xv, to be an old-format file, but really is a newer one.
Updated xvbmp.c to support reading the three newer versions of BMP format. See 60a25db
Three more versions of BMP were introduced since development of xv stopped.
These are for Windows 95 / NT4, Windows 98 / 2000, and Windows NT / 2000.
We still write BMP files in the old Windows 3.x version.
If you need some other version, use ImageMagick.
xv-20091212-patrick-keshishian-bmp-negative-height.patch.mime
xv-20091217-patrick-keshishian-bmp-negative-height.patch.mime
xv-20100405-patrick-keshishian-negative-height-sample.bmp.mime
From http://en.wikipedia.org/wiki/BMP_file_format
The patch works on the 30k test file provided. Here is the header:
I found another, much smaller, test image at https://issues.apache.org/jira/browse/IMAGING-162. Even with the patch, xv doesn't like it.
Here's the whole file (cannot attach bmp files to Github issues):
This is the entire hexdump of the file:
So... it appears that the patch is deficient in handling newer-format .bmp files.
Patch was originally applied in 564e566. More work is necessary.
The text was updated successfully, but these errors were encountered: