1 ////////////////////////////////////////////////////////////////////////////////
7 // Author: Daniel Switkin
9 // Copyright 2003 (c) by Daniel Switkin. This file is made publically available
10 // under the BSD license, with the stipulations that this complete header must
11 // remain at the top of the file indefinitely, and credit must be given to the
12 // original author in any about box using this software.
14 ////////////////////////////////////////////////////////////////////////////////
16 // Additional authors: Stephan Aßmus, <superstippi@gmx.de>
17 // Philippe Saint-Pierre, <stpere@gmail.com>
18 // John Scipione, <jscipione@gmail.com>
26 #include "SavePalette.h"
29 #include "GIFTranslator.h"
35 #define HASH(index, lastbyte) (((lastbyte << 8) ^ index) % HASHSIZE)
40 GIFSave(BBitmap
* bitmap
, BPositionIO
* output
,
41 TranslatorSettings
* settings
);
47 status_t
WriteGIFHeader();
48 status_t
WriteGIFControlBlock();
49 status_t
WriteGIFImageHeader();
50 status_t
WriteGIFImageData();
51 status_t
OutputCode(short code
, int BITS
,
54 unsigned char NextPixel(int pixel
);
56 void ResetHashtable();
57 int CheckHashtable(int s
, unsigned char c
);
58 void AddToHashtable(int s
, unsigned char c
);
64 TranslatorSettings
* fSettings
;
69 unsigned char* append_char
;
77 unsigned char character
;
81 unsigned int bit_buffer
;
83 unsigned char byte_buffer
[257];
88 unsigned char* gifbits
;
99 int16 green_side_error
;
100 int16 blue_side_error
;