corrected check of the bytesperline field which caused monochrome PCX

2008-01-22  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/pcx.c: corrected check of the bytesperline field
	which caused monochrome PCX images to be rejected (bug #510658).

svn path=/trunk/; revision=24670
This commit is contained in:
Sven Neumann 2008-01-22 13:15:55 +00:00 committed by Sven Neumann
parent daf38cc6eb
commit 39db00b89e
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2008-01-22 Sven Neumann <sven@gimp.org>
* plug-ins/common/pcx.c: corrected check of the bytesperline field
which caused monochrome PCX images to be rejected (bug #510658).
2008-01-22 Sven Neumann <sven@gimp.org>
* app/core/gimp.[ch]: added new function gimp_use_gegl().

View file

@ -381,7 +381,7 @@ load_image (const gchar *filename)
g_message (_("Unsupported or invalid image height: %d"), height);
return -1;
}
if (bytesperline < width)
if (bytesperline < (width * pcx_header.bpp) / 8)
{
g_message (_("Invalid number of bytes per line in PCX header"));
return -1;