1 typedef struct Rawimage Rawimage;
13 int fields; /* defined by format */
14 int gifflags; /* gif only; graphics control extension flag word */
15 int gifdelay; /* gif only; graphics control extension delay in cs */
16 int giftrindex; /* gif only; graphics control extension transparency index */
17 int gifloopcount; /* number of times to loop in animation; 0 means forever */
22 /* Channel descriptors */
23 CRGB = 0, /* three channels, no map */
24 CYCbCr = 1, /* three channels, no map, level-shifted 601 color space */
25 CY = 2, /* one channel, luminance */
26 CRGB1 = 3, /* one channel, map present */
27 CRGBV = 4, /* one channel, map is RGBV, understood */
28 CRGB24 = 5, /* one channel in correct data order for loadimage(RGB24) */
29 CRGBA32 = 6, /* one channel in correct data order for loadimage(RGBA32) */
30 CYA16 = 7, /* one channel in correct data order for loadimage(Grey8+Alpha8) */
31 CRGBVA16= 8, /* one channel in correct data order for loadimage(CMAP8+Alpha8) */
45 typedef struct ImageInfo {
52 Rawimage** readjpg(int, int);
53 Rawimage** Breadjpg(Biobuf *b, int);
54 Rawimage** readpng(int, int);
55 Rawimage** Breadpng(Biobuf *b, int);
56 Rawimage** readgif(int, int);
57 Rawimage** readpixmap(int, int);
58 Rawimage* torgbv(Rawimage*, int);
59 Rawimage* totruecolor(Rawimage*, int);
60 int writerawimage(int, Rawimage*);
61 void* _remaperror(char*, ...);
63 typedef struct Memimage Memimage; /* avoid necessity to include memdraw.h */
65 char* startgif(Biobuf*, Image*, int);
66 char* writegif(Biobuf*, Image*, char*, int, int);
68 char* memstartgif(Biobuf*, Memimage*, int);
69 char* memwritegif(Biobuf*, Memimage*, char*, int, int);
70 void memendgif(Biobuf*);
71 Image* onechan(Image*);
72 Memimage* memonechan(Memimage*);
74 char* writeppm(Biobuf*, Image*, char*, int);
75 char* memwriteppm(Biobuf*, Memimage*, char*, int);
76 Image* multichan(Image*);
77 Memimage* memmultichan(Memimage*);
79 char* memwritepng(Biobuf*, Memimage*, ImageInfo*);