* libgimp/gserialize.c * libgimp/gserialize.h: Changed the enum values to allow for simpler future expansion. * libgimp/parasite.c * libgimp/parasite.h: s/persistant/persistent/. new accessor functions for parasites. #defines for new flags. * app/paintbrush.c: added timeing code for brush strokes. It is #ifed out, and is only valid for shift clicks. * app/parasite_cmds.h: fixed a warning * app/parasitelist.h * app/parasitelist.c: added _for_each and _length functions * app/gimpdrawable.c: set the dirty flag when adding or removing a persistent parasite * app/gimpimage.c: set the dirty flag when adding or removing a persistent parasite. Fixed bug and removed debug statements in merge_down. * app/xcf.c: save and load resolution, parasites, and tattoos. * app/main.c: updated the deserialize test. * plug-ins/tiff/tiff.c * plug-ins/gif/gif.c: use PARASITE_PERSISTENT define instead of 1 * plug-ins/bmp/bmp.c * plug-ins/bmp/bmp.h: declare some struct variable as extern. * app/paint_funcs.c: Lots of optimizations aimed at speeding up painting. Should see a 2-4X speed up on most painting (depending on paint modes, brush size etc.) * app/drawable.c: check for NULL drawable in drawable_ID. this stops us from being crashed by ill-behaved plug-ins
59 lines
1.8 KiB
C
59 lines
1.8 KiB
C
#include <libgimp/gimp.h>
|
|
|
|
#define MAXCOLORS 256
|
|
#define Image gint32
|
|
|
|
#define BitSet(byte, bit) (((byte) & (bit)) == (bit))
|
|
|
|
#define ReadOK(file,buffer,len) (fread(buffer, len, 1, file) != 0)
|
|
#define Write(file,buffer,len) fwrite(buffer, len, 1, file)
|
|
#define WriteOK(file,buffer,len) (Write(buffer, len, file) != 0)
|
|
|
|
extern gint32 ToL(guchar *);
|
|
extern void FromL(gint32, guchar *);
|
|
extern gint16 ToS(guchar *);
|
|
extern void FromS(gint16, guchar *);
|
|
extern gint32 ReadBMP (char *);
|
|
extern gint WriteBMP (char *,gint32,gint32);
|
|
extern gint ReadColorMap(FILE *, unsigned char[256][3], int, int, int *);
|
|
extern Image ReadImage(FILE *, int, int, unsigned char[256][3], int, int, int, int, int);
|
|
extern void WriteColorMap(FILE *, int *, int *, int *, int);
|
|
extern void WriteImage(FILE *,guchar *,int,int,int,int,int,int,int);
|
|
|
|
extern int interactive_bmp;
|
|
extern char *prog_name;
|
|
extern char *filename;
|
|
extern FILE *errorfile;
|
|
|
|
extern struct Bitmap_File_Head_Struct
|
|
{
|
|
unsigned long bfSize; /* 02 */
|
|
unsigned long reserverd; /* 06 */
|
|
unsigned long bfOffs; /* 0A */
|
|
unsigned long biSize; /* 0E */
|
|
}Bitmap_File_Head;
|
|
|
|
extern struct Bitmap_Head_Struct
|
|
{
|
|
unsigned long biWidth; /* 12 */
|
|
unsigned long biHeight; /* 16 */
|
|
unsigned short biPlanes; /* 1A */
|
|
unsigned short biBitCnt; /* 1C */
|
|
unsigned long biCompr; /* 1E */
|
|
unsigned long biSizeIm; /* 22 */
|
|
unsigned long biXPels; /* 26 */
|
|
unsigned long biYPels; /* 2A */
|
|
unsigned long biClrUsed; /* 2E */
|
|
unsigned long biClrImp; /* 32 */
|
|
/* 36 */
|
|
}Bitmap_Head;
|
|
|
|
extern struct Bitmap_OS2_Head_Struct
|
|
{
|
|
unsigned short bcWidth; /* 12 */
|
|
unsigned short bcHeight; /* 14 */
|
|
unsigned short bcPlanes; /* 16 */
|
|
unsigned short bcBitCnt; /* 18 */
|
|
}Bitmap_OS2_Head;
|
|
|