1 /* minigimp.h -- extremely basic image manipulation routines
2  * by pts@fazekas.hu at Sun Sep 29 22:33:48 CEST 2002
3  */
4 
5 #ifndef MINIGIMP_H
6 #define MINIGIMP_H
7 
8 #if defined(__GNUC__) && defined(__cplusplus)
9 #pragma interface
10 #endif
11 
12 #include "miniglib.h"
13 
14 /** The MiniGIMP image model:
15  * -- An image is a container of layers and channels. There are three image
16  *    types: GIMP_RGB, GIMP_GRAY and GIMP_INDEXED. channels are of drawable
17  *    type GIMP_CHANNEL, and they contain intensity (not color). layers
18  *    contain color and opacity information; the layer type of the layers is
19  *    limited by the image type. For the image type GIMP_INDEXED, all layers
20  *    share the same cmap (color map, palette, lookup-table, LUT). An image
21  *    never contains pixel data
22  *    directly, individual pixels are stored in layers and channels.
23  *    Valid combinations for layers and images are:
24  *
25  *      image type    layer type           image cmap         image ncolors
26  *      ~~~~~~~~~~    ~~~~~~~~~~           ~~~~~~~~~~         ~~~~~~~~~~~~~
27  *      GIMP_RGB      GIMP_RGB_IMAGE       NULL               -2
28  *      GIMP_GRAY     GIMP_GRAY_IMAGE      NULL               -1
29  *      GIMP_INDEXED  GIMP_INDEXED_IMAGE   guchar[3*ncolors]  ncolors
30  *      GIMP_RGB      GIMP_RGBA_IMAGE      NULL               -2
31  *      GIMP_GRAY     GIMP_GRAYA_IMAGE     NULL               -1
32  *      GIMP_INDEXED  GIMP_INDEXEDA_IMAGE  guchar[3*ncolors]  ncolors
33  *
34  * -- Channels are not considered when displaying the image. Layers are
35  *    considered in order: the bottommost layer is displayed first, and other
36  *    layers are drawn over it with their respective opacity. Note most image
37  *    file export routines in the current implementation
38  *    completely ignore channels, and respect only the
39  *    first layer (i.e the layer created first by gimp_layer_new()) when
40  *    saving images.
41  *
42  * -- A drawable is a rectangular array of pixels with positive integer
43  *    width and height. The drawable is identified by its handle (a positive
44  *    integer). After a drawable is created, it should be quickly added to
45  *    an image.
46  *
47  * -- GimpDrawable is a C struct that contains meta-information of a
48  *    drawable, such as width, height, bpp (bytes per pixel). A GimpDrawable
49  *    never contains pixel data. gimp_drawable_get() can be used to get
50  *    the GimpDrawable of a hdrawable, and gimp_pixel_rgn_init() can be used
51  *    to get access to the image pixel data in memory.
52  *
53  * -- A layer is a special drawable that contains color and opacity
54  *    information. For drawable type GIMP_RGB{,A}_IMAGE each color is from
55  *    the 8-bit RGB color space. For drawable type GIMP_GRAY{,A}_IMAGE each
56  *    color is from the 8-bit grayscale color space (0 is black). For
57  *    drawable type GIMP_INDEXED{,A}_IMAGE each color is an 8-bit index to
58  *    the 8-bit RGB palette colormap (cmap) of the corresponding image.
59  *    Opacity information (if present) is stored as an 8-bit alpha value: 255
60  *    is fully opaque, 0 is transparent, middle values represent fuzzy
61  *    transparency (useful for antialiasing). RGB colors are documented as
62  *    hex triplets of the form #RRGGBB (i.e #7f0000 is midlle-red), RGBA pixel
63  *    values are documented as hex tuples of the form #RRGGBB#AA.
64  *
65  * -- Opacity is stored in memory
66  *    as so-called ``unassociated alpha'' data, i.e #00007f#ff is
67  *    opaque dark-blue, #RRGGBB#00 is a transparent pixel of whatever color,
68  *    #00007f#7f is half-opaque dark-blue. In the contrary, in _associated_
69  *    alpha, #00007f#7f means half-opaque full-blue. The PNG file format
70  *    stores alpha this way (unassociated), TIFF allows both associated and
71  *    unassocitated, but most TIFF viewers support only associated, so TIFF
72  *    export routines should call gimpts_drawable_assoc() first.
73  *
74  * -- A channel is a special drawable that contains arbitrary intensity
75  *    information, except for color and opacity. The term ``alpha channel''
76  *    is misleading, because alpha (opacity) information is part of layers,
77  *    and has nothing to do with channels. Examples for a channel: floating
78  *    selection; selection mask of the face on the Mona Lisa picture. A
79  *    maximal (white) value represents fully selected, a zero (balck)
80  *    represents unselected, and mid-gray values represent fuzzy membership.
81  */
82 
83 #undef  PTS_USE_PDB /* use GIMP Procedural DataBase (PDB) interface? */
84 #undef  PTS_USE_GUI /* use GUI elements (dialog boxes, progress indicators)? -- yes doesn't work */
85 #undef  PTS_USE_GIMPRGB
86 #undef  PTS_USE_PROGRESS
87 
88 typedef unsigned char GimpImageType; /* vvv */
89 #define GIMP_RGB 6 /* :image_type */
90 #define GIMP_GRAY 7 /* :image_type */
91 #define GIMP_INDEXED 8 /* :image_type */
92 /** PtsGIMP extension */
93 #define GIMP_CHANNEL 10 /* :channel_type (must be even) */
94 #define GIMP_RGB_IMAGE 12 /* :layer_type */
95 #define GIMP_RGBA_IMAGE 13 /* :layer_type */
96 #define GIMP_GRAY_IMAGE 14 /* :layer_type */
97 #define GIMP_GRAYA_IMAGE 15 /* :layer_type */
98 /** Even */
99 #define GIMP_INDEXED_IMAGE 16 /* :layer_type */
100 /** Odd */
101 #define GIMP_INDEXEDA_IMAGE 17 /* :layer_type */
102 #define IS_DRAWABLE_ALPHA(type) ((type&1)!=0)
103 
104 typedef struct GimpDrawable {
105   gint32 handle;
106   guint32 width, height;
107   /** 0.0 .. 100.0 */
108   gdouble opacity;
109   /** Bytes per pixel. */
110   unsigned char bpp;
111   /** GIMP_{RGB,GRAY,INDEXED}{,A}_IMAGE */
112   char const *name;
113   GimpImageType type;
114   /** Bits per component. PtsGIMP extension. For normal drawables,
115    * bpc==8 is true, but for outdatas, it isn't!
116    */
117   unsigned char bpc;
118   /** Always GIMP_NORMAL_MODE */
119   unsigned char mode;
120 } GimpDrawable;
121 
122 /** Dat: cannot hide this struct from interface, because ptstiff3.c declares
123  * variables as struct `GimpPixelRgn pixel_rgn;'
124  */
125 typedef struct GimpPixelRgn {
126   /** Memory index of top-left pixel */
127   guchar *topleft;
128   /** GIMP_{RGB,GRAY,INDEXED}{,A}_IMAGE */
129   GimpImageType type;
130   /** Bytes per pixel. (`type' -> `bpp') */
131   unsigned char bpp;
132   /** Bytes per scanline. */
133   gsize_t bpl;
134   /** Bytes to be skipped after each scanline */
135   /* gsize_t skip; */
136   guint32 width, height;
137   /** Minimum coordinates into which drawing is possible. */
138   guint32 minx, miny;
139 } GimpPixelRgn;
140 
141 typedef struct GimpParasite {
142   /* gchar *name; */ /* points to (this)+1 */
143   gpointer data;
144   gchar *name;
145   gsize_t data_size;
146   slen_t refc;
147   /** Curcularly linked list */
148   struct GimpParasite *prev, *next;
149 } GimpParasite;
150 
151 /** Holds meta-information about an image or drawable */
152 typedef struct GimptsMeta {
153   /** 0 for opaque drawable, 1|2|4|8 otherwise */
154   guchar minAlphaBpc;
155   /** 1|2|4|8 otherwise */
156   guchar minRGBBpc;
157   /** false iff RGB is required */
158   gbool canGray;
159   /** Number of unique (different) colors in the non-transparent part,
160    * only about the last drawable. 257 for too many.
161    */
162   guint nncols;
163   /** About the last drawable. */
164   guint32 width, height;
165 } GimptsMeta;
166 
167 typedef unsigned char GimptsFileFormat;
168 #define GIMPTS_FF_UNKNOWN 0 /* may be a valid image, but we don't know */
169 #define GIMPTS_FF_INVALID 1 /* cannot be an image file */
170 #define GIMPTS_FF_NONE 2
171 #define GIMPTS_FF_TIFF 3
172 #define GIMPTS_FF_PCX 4
173 #define GIMPTS_FF_JPEG 5
174 #define GIMPTS_FF_GIF 6
175 #define GIMPTS_FF_XPM 7
176 #define GIMPTS_FF_TGA 8
177 #define GIMPTS_FF_PNG 9
178 #define GIMPTS_FF_LBM 10
179 #define GIMPTS_FF_BMP 11
180 #define GIMPTS_FF_eps 12
181 #define GIMPTS_FF_ps 13
182 #define GIMPTS_FF_pbm 14
183 #define GIMPTS_FF_pgm 15
184 #define GIMPTS_FF_ppm 16
185 #define GIMPTS_FF_PNM 17
186 
187 typedef unsigned char GimptsTransferEncoding;
188 #define GIMPTS_TE_UNKNOWN 0
189 #define GIMPTS_TE_BINARY 1
190 #define GIMPTS_TE_HEX 2
191 #define GIMPTS_TE_A85 3
192 #define GIMPTS_TE_ASCII 4
193 #define GIMPTS_TE_MSBFIRST 5
194 #define GIMPTS_TE_LSBFIRST 6
195 
196 #if PTS_USE_GIMPRGB
197 typedef struct GimpRGB {
198   unsigned char rrr, ggg, bbb;
199 } GimpRGB;
200 EXTERN_C void gimp_rgb_set(GimpRGB *color, gfloat r, gfloat g, gfloat b);
201 #else
202 typedef struct GimpRGB GimpRGB;
203 #endif
204 
205 /** Creates a new channel (not belonging to any image) from the alpha values
206  * of the specified drawable. The returned channel can be freed later by
207  * calling gimp_drawable_free(). Creates the channel width all-255 values
208  * even if !IS_DRAWABLE_ALPHA(gimp_drawable_type(hdrawable)).
209  */
210 EXTERN_C /*hchannel*/gint32 gimpts_drawable_extract_alpha(gint32 hdrawable);
211 EXTERN_C void gimpts_meta_init(GimptsMeta *meta);
212 /** The caller should get rid of the alpha channel to make .minRGBBpc reflect
213  * only the status of the fully opaque pixels. Sets canGray to false if the
214  * cmap for indexed images contains a non-gray color; you have to call
215  * _packpal() first to get rid of unused colors. Incorporates unused colors
216  * into .nncols.
217  *  @param meta the .minAlphaBPC, .minRGBBpc and .canGray fields are made
218  *    stricter. .nncols, .width and .height are set.
219  */
220 EXTERN_C void gimpts_meta_update(GimptsMeta *meta, gint32 hdrawable);
221 /** refc++ */
222 EXTERN_C GimpParasite* gimp_image_parasite_find (gint32 orig_image, char const* /*"gimp-comment"*/);
223 /** refc--, destructor */
224 EXTERN_C void gimp_parasite_free(GimpParasite*);
225 /** inline gsize_t gimp_parasite_data_size(GimpParasite *parasite); */
226 #define gimp_parasite_data_size(parasite) ((parasite)->data_size)
227 /** inline guchar *gimp_parasite_data(GimpParasite *parasite); */
228 #define gimp_parasite_data(parasite) ((parasite)->data)
229 /** by pts */
230 #define gimp_parasite_name(parasite) ((gchar*)(void*)(parasite+1))
231 #define GIMP_PARASITE_PERSISTENT 1 /* :gimp_parasite_new(opts) */
232 EXTERN_C GimpParasite *gimp_parasite_new(char const*name, unsigned opts, gsize_t size, gpointer data);
233 /** The attach function automatically
234  * detaches a previous incarnation of the parasite.
235  */
236 EXTERN_C void gimp_image_parasite_attach(gint32 image, GimpParasite *parasite);
237 
238 EXTERN_C char *gimp_get_default_comment(void);
239 /** needed by PDB only, but we include here nevertheless */
240 EXTERN_C void gimp_image_delete (gint32 image);
241 EXTERN_C GimpImageType gimp_drawable_type(gint32 hdrawable);
242 /** PtsGIMP extension */
243 EXTERN_C GimpImageType gimp_image_type(gint32 himage);
244 
245 EXTERN_C void gimp_quit (void);
246 EXTERN_C gint32 gimp_image_new(gint cols, gint rows, gint image_type);
247 EXTERN_C void gimp_image_set_filename(gint32 image, char const* filename);
248 typedef unsigned GimpUnit; /* vvv */
249 #define GIMP_UNIT_INCH 1
250 #define GIMP_UNIT_MM 2
251 #define GIMP_UNIT_PIXEL 3
252 #define GIMP_UNIT__MAX 3
253 EXTERN_C void gimp_image_set_resolution (gint32 image, gdouble xres, gdouble yres);
254 EXTERN_C void gimp_image_set_unit (gint32 image, GimpUnit unit);
255 /** @param cmap cmap[0] is red, cmap[1] is green, cmap[2] is blue
256  * @param ncolors must be <=0x300
257  */
258 EXTERN_C void gimp_image_set_cmap (gint32 image, guchar *cmap, guint ncolors);
259 /** @param ncolors out, may be NULLP
260  * @return NULLP if not GIMP_INDEXED, or there is no colormap yet
261  */
262 EXTERN_C guchar* gimp_image_get_cmap(gint32 image, gint *ncolors);
263 EXTERN_C void gimp_image_get_resolution (gint32 orig_image, gdouble *xresolution, gdouble *yresolution);
264 EXTERN_C GimpUnit gimp_image_get_unit (gint32 orig_image);
265 /**
266  * @param image ignored
267  * @return number to multiply a dimen in inches to get the dimen in param
268  * `units', 0 on unknown unit
269  */
270 EXTERN_C gint32 gimp_layer_new (gint32 himage, char const*name /*_("Background")*/, guint32 cols, guint32 rows, gint layer_type, gdouble opacity /*100*/, unsigned mode);
271 #define GIMP_NORMAL_MODE 1 /* ^^^ */
272 EXTERN_C void gimp_image_add_layer(gint32 himage, gint32 hlayer, unsigned dummy);
273 /**
274  * @param image ignored
275  * @param color ignored
276  */
277 EXTERN_C gint32 gimp_channel_new(gint32 image, char const*name /*_("TIFF Channel")*/, guint32 cols, guint32 rows, gdouble opacity, GimpRGB *color);
278 /** Dat: return type should be GimpDrawable const* */
279 EXTERN_C GimpDrawable* gimp_drawable_get(gint32 hdrawable);
280 EXTERN_C void gimp_image_add_channel(gint32 image, gint32 hchannel, unsigned dummy);
281 /** ?? synchronize data with server */
282 EXTERN_C void gimp_drawable_flush (GimpDrawable* drawable);
283 /** refc--, destructor for the GimpDrawable struct. Currently no-op because
284  * the struct is used internally.
285  */
286 EXTERN_C void gimp_drawable_detach(GimpDrawable* drawable);
287 /** PtsGIMP */
288 EXTERN_C void gimp_drawable_free(gint32 hdrawable);
289 /** Initializes a pixel region, so gimp_pixel_rgn_set_rect(pixel_rgn, ...,
290  * startcol, startrow, cols, rows); can draw to it.
291  */
292 EXTERN_C void gimp_pixel_rgn_init (GimpPixelRgn *pixel_rgn, GimpDrawable *drawable, guint32 startcol, guint32 startrow, guint32 cols, guint32 rows, gbool writeAllowed /* ?? */, gbool alwaysFALSE);
293 /** PtsGIMP. Initializes a pixel region, so gimp_pixel_rgn_set_rect(pixel_rgn, ...,
294  * 0, 0, cols, rows); can draw to it.
295  */
296 EXTERN_C void gimp_pixel_rgn_init_rel (GimpPixelRgn *pixel_rgn, GimpDrawable *drawable, guint32 startcol, guint32 startrow, guint32 cols, guint32 rows, gbool writeAllowed /* ?? */, gbool alwaysFALSE);
297 EXTERN_C void gimp_pixel_rgn_set_rect(GimpPixelRgn *pixel_rgn, guchar const*src, guint32 x, guint32 y, guint32 width, guint32 height);
298 #if PTS_USE_PROGRESS
299   EXTERN_C void gimp_progress_init(char const*);
300   EXTERN_C void gimp_progress_update(gdouble per1);
301 #else
302   #define gimp_progress_init(dummy)
303   #define gimp_progress_update(dummy)
304 #endif
305 EXTERN_C void gimp_pixel_rgn_get_rect(GimpPixelRgn *pixel_rgn, guchar *pixels, guint32 startcol, guint32 startrow, guint32 cols, guint32 rows);
306 /** PtsGIMP. Gets the pixels at the specified bits per component. Rows are
307  * padded to byte boundary, unused bits are set to zero. Bytes are filled
308  * bit-128-first. The first byte of a row belongs to the leftmost pixels.
309  * Equivalent to gimp_pixel_rgn_get_rect() if dstbpc==8 and yflip==false.
310  * @param dstbpc bits per component (1, 2, 4 or 8) in which the image must be
311  *   put into `dst'.
312  * @param yflip should line 0 (top line in pixel_rgn) be the bottom line in
313  *   the returned data?
314  */
315 EXTERN_C void gimp_pixel_rgn_get_rect_bpc(GimpPixelRgn *pixel_rgn, guchar *pixels, guint32 startcol, guint32 startrow, guint32 cols, guint32 rows, guchar bpc, gbool yflip);
316 /** @param colors returns the number of colors in cmap.
317  * @return NULLP if
318  */
319 EXTERN_C gdouble gimp_unit_get_factor (GimpUnit unit);
320 /** @return suggested value for the height of the chunk in which an image
321  * should be read. It would be a bad idea to just return int.max here, because
322  * most routines pre-allocate this much data, even if the image is smaller;
323  * and most images are smaller than 32767 lines. So we return 256 here.
324  */
325 #define gimp_tile_height() ((guint32)256)
326 /* EXTERN_C guint32 gimp_tile_height(void); */
327 #if 0
328 EXTERN_C void gimpts_rgb2indexed(guchar *dst, guchar *dstend, guint *ncolors_ret, guchar cmap_ret[768], guchar *src, gbool srcalpha);
329 EXTERN_C void gimpts_rgba2indexed(guchar *dst, guchar *dstend, guint *ncolors_ret, guchar cmap_ret[768], guchar *src);
330 #endif
331 /** Converts RGB image data to exact indexed.
332  * @param ncolors_ret number of colors required, or 0 if impossible to convert
333  * @param cmap_ret 768 bytes preallocated
334  * @param dst dstend-dst bytes preallocated (or NULLP)
335  * @param src (dstend-dst)*3 bytes preallocated
336  * @param adst 1 or 2(alpha)
337  * @param asrc 3 or 4(alpha)
338  * @param img0 NULL
339  */
340 EXTERN_C void gimpts_rgb2indexed(void *img0, guchar *dst, gsize_t srclen, guint *ncolors_ret, guchar cmap_ret[768], guchar *src, unsigned adst, unsigned asrc);
341 /** Eliminates unused and duplicate colors from the cmap.
342  * @param dst GIMP_INDEXED_IMAGE or GIMP_INDEXEDA_IMAGE in dst ... dstend
343  * @param ncolors_inout number of colors in cmap (before and after)
344  * @param cmap_inout colormap palette, modified in place
345  * @param alpha alpha true if dst:GIMP_INDEXEDA_IMAGE, false if dst:GIMP_INDEXED_IMAGE
346  */
347 EXTERN_C void gimpts_indexed_packpal(guchar *dst, guchar *dstend, guint *ncolors_inout, guchar cmap_inout[768], gbool alpha);
348 /* EXTERN_C void gimpts_indexed_packpal_incr(Hash46 *h46, guchar *dst, guchar *dstend, guint *ncolors_inout, guchar cmap_inout[768], gbool alpha); */
349 /** Eliminates unused and duplicate colors from the cmap of the image.
350  * Modifies all drawables that hdrawable shares its cmap with.
351  * @param hdrawable the drawable to consider first (or 0)
352  * @param himage all indexed drawables of the image should be considered (or 0)
353  */
354 EXTERN_C void gimpts_drawable_packpal(gint32 hdrawable, gint32 himage);
355 /** May fail when converting to GIMP_INDEXED*_IMAGE (failure means:
356  * post(ncolors==0)). Doesn't call
357  * gimpts_drawable_packpal() automatically. May extend the image cmap.
358  */
359 EXTERN_C void gimpts_drawable_convert(gint32 hdrawable, GimpImageType dt);
360 /** Duplicates the specified drawable into a different drawable_type.
361  * May fail when converting to GIMP_INDEXED*_IMAGE (failure means:
362  * post(ncolors==0)). Doesn't call
363  * gimpts_drawable_packpal() automatically. May extend the image cmap.
364  */
365 EXTERN_C /*hdrawable*/gint32 gimpts_drawable_dup(gint32 hdrawable, GimpImageType dt);
366 /** Adds nonassociated alpha (specified in `halpha') to `hdrawable);
367  * @param hdrawable GIMP_CHANNEL or GIMP_GRAY_IMAGE or GIMP_RGB_IMAGE or
368  *        GIMP_INDEXED image
369  * @param halpha GIMP_GRAY_IMAGE or GIMP_CHANNEL
370  */
371 EXTERN_C void gimpts_drawable_noassalpha(gint32 hdrawable, gint32 halpha);
372 /** Takes a background image (with solid background color specified in param
373  * `bg', and dimensions equal to those of hdrawable), and draws `hdrawable'
374  * onto it. Overwrites `hdrawable' with the resulting drawable. Ingores
375  * bg[1] and bg[2] if hdrawable was _GRAYA_. Does nothing (1) if hdrawable
376  * was _INDEXEDA_. Note that (1) is possibly incorrect behaviour; you should
377  * call gimpts_drawable_convert() first to convert from _INDEXEDA_ to
378  * _RGBA_. The alpha channel of the resulting hdrawable will be
379  * meaningless, so you should call gimpts_drawable_convert() to ignore it.
380  * @param hdrawable modifies GIMP_{RGB,INDEXED,GRAY}A_IMAGE, other drawable
381  *        types are left unchanged
382  * @param bg a RGB background color, bg[0] is red, bg[2] is blue
383  */
384 EXTERN_C void gimpts_drawable_alpha_assoc(gint32 hdrawable, guchar const bg[3]);
385 /** Unlinks the drawable from its containter image. */
386 EXTERN_C void gimpts_drawable_unlink(gint32 hdrawable);
387 /** @return a hdrawable or 0 */
388 EXTERN_C /*hdrawable*/gint32 gimpts_image_first_drawable(gint32 himage);
389 /** @return a hdrawable or 0 */
390 EXTERN_C /*hdrawable*/gint32 gimpts_drawable_next(gint32 hdrawable);
391 #define gimpts_pixel_rgn_get_topleft(r) ((r)->topleft)
392 EXTERN_C GimptsFileFormat gimpts_magic(gchar const* filename);
393 
394 #if PTS_USE_PDB
395 typedef unsigned GimpPDBStatusType; /* vvv */
396 #define GIMP_PDB_EXECUTION_ERROR 1
397 #define GIMP_PDB_SUCCESS 2
398 #define GIMP_PDB_CANCEL 3
399 #define GIMP_PDB_CALLING_ERROR 4
400 #define GIMP_PDB_INT32 1
401 #define GIMP_PDB_STRING 2
402 #define GIMP_PDB_IMAGE 3
403 #define GIMP_PDB_DRAWABLE 4
404 #define GIMP_PDB_STATUS 5
405 #define GIMP_PLUGIN 0
406 
407 typedef struct GimpParam {
408   unsigned type;
409   union {
410     gint32 d_int32;
411     GimpPDBStatusType d_status;
412     gchar *d_string;
413     gint32 d_image;
414   } data;
415 } GimpParam;
416 typedef struct GimpPlugInInfo {
417   void *init_proc;
418   void *quit_proc;
419   void (*query_proc)(void);
420   void (*run_proc)    (gchar      *name,
421 		       gint        nparams,
422 		       GimpParam  *param,
423 		       gint       *nreturn_vals,
424 		       GimpParam **return_vals);
425 } GimpPlugInInfo;
426 typedef struct GimpParamDef {
427   int type;
428   char *name;
429   char *desc;
430 } GimpParamDef;
431 EXTERN_C void  gimp_install_procedure (char* /*"file_tiff_load"*/,
432                           char* /*"loads files of the tiff file format"*/,
433                           char* /*"FIXME: write help for tiff_load"*/,
434                           char* /*"Spencer Kimball, Peter Mattis & Nick Lamb"*/,
435                           char* /*"Nick Lamb <njl195@zepler.org.uk>"*/,
436                           char* /*"1995-1996,1998-2000"*/,
437                           char* /*"<Load>/Tiff"*/,
438 			  char* /*NULL*/,
439                           int /*GIMP_PLUGIN*/,
440                           unsigned /*G_N_ELEMENTS (load_args)*/,
441                           unsigned /*G_N_ELEMENTS (load_return_vals)*/,
442                           GimpParamDef* /*load_args*/,
443                           GimpParamDef* /*load_return_vals*/);
444 EXTERN_C void gimp_register_magic_load_handler (char* /*"file_tiff_load"*/,
445 			    char* /*"tif,tiff"*/,
446 			    char* /*""*/,
447 			    char* /*"0,string,II*\\0,0,string,MM\\0*"*/);
448 EXTERN_C void gimp_register_save_handler       (char* /*"file_tiff_save"*/,
449 			    char* /*"tif,tiff"*/,
450 			    char* /*""*/);
451 typedef unsigned GimpRunMode;
452 #define GIMP_RUN_INTERACTIVE 1
453 #define GIMP_RUN_WITH_LAST_VALS 2
454 #define GIMP_RUN_NONINTERACTIVE 3
455 #define GIMP_EXPORT_CANCEL 1
456 #define GIMP_EXPORT_EXPORT 2
457 typedef unsigned GimpExportReturnType; /* return from image export (save) dialog box */
458 EXTERN_C GimpExportReturnType gimp_export_image (gint32* /*&image*/, gint32* /*&drawable*/, char* /*"TIFF"*/, unsigned /* GIMP_EXPORT_CAN_*| */); /* ?? */
459 #define GIMP_EXPORT_CAN_HANDLE_RGB 1
460 #define GIMP_EXPORT_CAN_HANDLE_GRAY 2
461 #define GIMP_EXPORT_CAN_HANDLE_INDEXED 4
462 #define GIMP_EXPORT_CAN_HANDLE_ALPHA 8
463 #define INIT_I18N_UI()
464 #define INIT_I18N()
465 EXTERN_C void gimp_ui_init(char* /*"tiff"*/, gbool /*FALSE*/);
466 EXTERN_C void gimp_get_data (char* /*"file_tiff_save"*/, gpointer /*&tsvals*/);
467 EXTERN_C void gimp_set_data (char* /*"file_tiff_save"*/, gpointer /*&tsvals*/, gsize_t /*sizeof (TiffSaveVals)*/);
468 #endif
469 
470 
471 #endif /* end of minigimp.h */
472