Commit 1bcba05b authored by Sven Neumann's avatar Sven Neumann

Updated bmp plug-in.


--Sven
parent b98b70f5
Mon Apr 27 18:09:01 MEST 1998 Sven Neumann <sven@gimp.org>
* updated bmp plug-in
Sun Apr 26 16:31:06 PDT 1998 Manish Singh <yosh@gimp.org>
* Made 0.99.28 release
......
/* bmp.c */
/* Version 0.43 */
/* Version 0.44 */
/* This is a File input and output filter for */
/* Gimp. It loads and saves images in windows(TM) */
/* bitmap format. */
......@@ -16,7 +16,7 @@
/* 06.04.1998 Bugfix in Padding */
/* 11.04.1998 Arch. cleanup (-Wall) */
/* Parses gtkrc */
/* 14.04.1998 Another Bug in Padding */
/*
* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
......
......@@ -52,7 +52,7 @@ WriteBMP (filename,image,drawable_ID)
int Green[MAXCOLORS];
int Blue[MAXCOLORS];
unsigned char *cmap;
int rows, cols, channels, MapSize, SpZeile;
int rows, cols, Spcols, channels, MapSize, SpZeile;
long BitsPerPixel;
int colors;
char *temp_buf;
......@@ -160,8 +160,9 @@ WriteBMP (filename,image,drawable_ID)
/* ... that we write to our headers. */
if ((((cols*BitsPerPixel)/8) % 4) == 0) SpZeile=((cols*BitsPerPixel)/8);
else SpZeile=((int)(((cols*BitsPerPixel)/8)/4)+1)*4;
if ((BitsPerPixel != 24) && (cols % (8/BitsPerPixel))) Spcols=(((cols / (8/BitsPerPixel))+1)*(8/BitsPerPixel)); else Spcols=cols;
if ((((Spcols*BitsPerPixel)/8) % 4) == 0) SpZeile=((Spcols*BitsPerPixel)/8);
else SpZeile=((int)(((Spcols*BitsPerPixel)/8)/4)+1)*4;
Bitmap_File_Head.bfSize=0x36+MapSize+(rows*SpZeile);
Bitmap_File_Head.reserverd=0;
Bitmap_File_Head.bfOffs=0x36+MapSize;
......
Markdown is supported
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