Commit 559276d4 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

Merged from HEAD branch (fix by Bill Skaggs):

2005-01-14  Sven Neumann  <sven@gimp.org>

	Merged from HEAD branch (fix by Bill Skaggs):

	* plug-ins/bmp/bmp.h
	* plug-ins/bmp/bmpread.c: handle negative height values
	as per spec, fixes bug #158033
parent f3860364
2005-01-14 Sven Neumann <sven@gimp.org>
Merged from HEAD branch (fix by Bill Skaggs):
* plug-ins/bmp/bmp.h
* plug-ins/bmp/bmpread.c: handle negative height values
as per spec, fixes bug #158033
2005-01-13 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* plug-ins/Lighting/lighting_shade.c: remove artifacts
......
......@@ -46,7 +46,7 @@ extern struct Bitmap_File_Head_Struct
extern struct Bitmap_Head_Struct
{
gulong biWidth; /* 12 */
gulong biHeight; /* 16 */
glong biHeight; /* 16 */
gushort biPlanes; /* 1A */
gushort biBitCnt; /* 1C */
gulong biCompr; /* 1E */
......
......@@ -103,7 +103,7 @@ ReadChannelMasks (FILE *fd, Bitmap_Channel *masks, guint channels)
guint32 tmp[3];
guint32 mask;
gint i, nbits, offset, bit;
if (!ReadOK (fd, tmp, 3 * sizeof (guint32)))
return FALSE;
......@@ -374,7 +374,7 @@ ReadBMP (const gchar *name)
/* Get the Image and return the ID or -1 on error*/
image_ID = ReadImage (fd,
Bitmap_Head.biWidth,
Bitmap_Head.biHeight,
ABS (Bitmap_Head.biHeight),
ColorMap,
Bitmap_Head.biClrUsed,
Bitmap_Head.biBitCnt,
......@@ -400,6 +400,9 @@ ReadBMP (const gchar *name)
gimp_image_set_resolution (image_ID, xresolution, yresolution);
}
if (Bitmap_Head.biHeight < 0)
gimp_image_flip (image_ID, GIMP_ORIENTATION_VERTICAL);
return image_ID;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment