[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59921] trunk/blender/source/blender/imbuf /intern/bmp.c: patch [#36633] Correct headers for renders saved as bitmap ( .bmp) format.
Campbell Barton
ideasman42 at gmail.com
Sun Sep 8 05:39:47 CEST 2013
Revision: 59921
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59921
Author: campbellbarton
Date: 2013-09-08 03:39:45 +0000 (Sun, 08 Sep 2013)
Log Message:
-----------
patch [#36633] Correct headers for renders saved as bitmap (.bmp) format.
by Brandon Northcutt (occamsdream)
Blender was writing invalid bitmaps that imagemagick and ffmpeg couldn't read.
Modified Paths:
--------------
trunk/blender/source/blender/imbuf/intern/bmp.c
Modified: trunk/blender/source/blender/imbuf/intern/bmp.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/bmp.c 2013-09-07 19:45:37 UTC (rev 59920)
+++ trunk/blender/source/blender/imbuf/intern/bmp.c 2013-09-08 03:39:45 UTC (rev 59921)
@@ -273,7 +273,7 @@
if (!ofile) return 0;
putShortLSB(19778, ofile); /* "BM" */
- putIntLSB(0, ofile); /* This can be 0 for BI_RGB bitmaps */
+ putIntLSB(bytesize + BMP_FILEHEADER_SIZE + sizeof(infoheader), ofile); /* Total file size */
putShortLSB(0, ofile); /* Res1 */
putShortLSB(0, ofile); /* Res2 */
putIntLSB(BMP_FILEHEADER_SIZE + sizeof(infoheader), ofile);
@@ -284,7 +284,7 @@
putShortLSB(1, ofile);
putShortLSB(24, ofile);
putIntLSB(0, ofile);
- putIntLSB(bytesize + BMP_FILEHEADER_SIZE + sizeof(infoheader), ofile);
+ putIntLSB(bytesize, ofile);
putIntLSB((int)(ibuf->ppm[0] + 0.5), ofile);
putIntLSB((int)(ibuf->ppm[1] + 0.5), ofile);
putIntLSB(0, ofile);
More information about the Bf-blender-cvs
mailing list