properly round the resolution entry. Fixes bug #332501.

2006-02-26  Simon Budig  <simon@gimp.org>

	* plug-ins/bmp/bmpwrite.c: properly round the resolution entry.
	Fixes bug #332501.
This commit is contained in:
Simon Budig 2006-02-26 21:55:40 +00:00 committed by Simon Budig
parent 50b0105822
commit 9f3f8e3f8f
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2006-02-26 Simon Budig <simon@gimp.org>
* plug-ins/bmp/bmpwrite.c: properly round the resolution entry.
Fixes bug #332501.
2005-06-26 Hans Breuer <hans@breuer.org>
* **/makefile.msc app/gimpcore.def : updated

View File

@ -268,9 +268,11 @@ WriteBMP (const gchar *filename,
* n dots inch 100 cm m dots
* ------ * ------- * ------ = ------
* inch 2.54 cm m inch
*
* We add 0.5 for proper rounding.
*/
Bitmap_Head.biXPels = (long int) (xresolution * 100.0 / 2.54);
Bitmap_Head.biYPels = (long int) (yresolution * 100.0 / 2.54);
Bitmap_Head.biXPels = (long int) (xresolution * 100.0 / 2.54 + 0.5);
Bitmap_Head.biYPels = (long int) (yresolution * 100.0 / 2.54 + 0.5);
}
}