This file is indexed.

/usr/include/flimage.h is in libforms-dev 1.0.93sp1-2build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
/*
 *  This file is part of the XForms library package.
 *
 *  XForms is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU Lesser General Public License as
 *  published by the Free Software Foundation; either version 2.1, or
 *  (at your option) any later version.
 *
 *  XForms is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with XForms.  If not, see <http://www.gnu.org/licenses/>.
 */

/********************** crop here for forms.h **********************/

/* Image related routines */

#ifndef FL_IMAGE_H
#define FL_IMAGE_H

#if defined(__cplusplus)
extern "C"
{
#endif

#ifndef FL_EXPORT
#define FL_EXPORT extern
#endif

#define fl_safe_free( p )     do {                   \
                                  if ( p )           \
                                  {                  \
                                      fl_free( p );  \
                                      p = NULL;      \
                                  }                  \
                              } while( 0 )

#define FL_RGB2GRAY( r, g, b )  \
    ( ( unsigned int )( ( 78 * ( r ) + 150 * ( g ) + 28 * ( b ) ) >> 8 ) )

enum {
    FL_IMAGE_NONE,
    FL_IMAGE_MONO   =    1,     /* b&w. 1bit. 0=white 1=black */
    FL_IMAGE_GRAY   =    2,     /* 8 bit gray image           */
    FL_IMAGE_CI     =    4,     /* colormmaped image          */
    FL_IMAGE_RGB    =    8,     /* RGBA image. 8bit each      */
    FL_IMAGE_PACKED =   16,     /* RGBA packed into an int    */
    FL_IMAGE_GRAY16 =   32,     /* 12bit gray scale image     */
    FL_IMAGE_RGB16  =   64,     /* 36bits color image         */
    FL_IMAGE_FLEX   = 1023,     /* all formats                */
    /* aliases */
    FLIMAGE_NONE    = FL_IMAGE_NONE,
    FLIMAGE_MONO    = FL_IMAGE_MONO,
    FLIMAGE_GRAY    = FL_IMAGE_GRAY,
    FLIMAGE_CI      = FL_IMAGE_CI,
    FLIMAGE_RGB     = FL_IMAGE_RGB,
    FLIMAGE_PACKED  = FL_IMAGE_PACKED,
    FLIMAGE_GRAY16  = FL_IMAGE_GRAY16,
    FLIMAGE_RGB16   = FL_IMAGE_RGB16,
    FLIMAGE_FLEX    = FL_IMAGE_FLEX
};

#ifndef FL_PCBITS
typedef unsigned char FL_PCTYPE;    /* primary color type */
#define FL_PCBITS         8 /* primary color bits */
#define FL_PCMAX          ( ( 1 << FL_PCBITS ) - 1 )
#define FL_PCCLAMP( a )   ( ( a ) > ( FL_PCMAX ) ?    \
                            ( FL_PCMAX ) : ( ( a ) < 0 ? 0 : ( a ) ) )

typedef unsigned int      FL_PACKED4;
#define FL_PACKED         FL_PACKED4

#define FL_RMASK          0x000000ff
#define FL_RSHIFT         0
#define FL_GMASK          0x0000ff00
#define FL_GSHIFT         8
#define FL_BMASK          0x00ff0000
#define FL_BSHIFT         16
#define FL_AMASK          0xff000000
#define FL_ASHIFT         24

/* If PCBITS is not 8, we need to apply the RGBmask */

#define FL_GETR( packed ) (   ( packed )                & FL_RMASK )
#define FL_GETG( packed ) ( ( ( packed ) >> FL_GSHIFT ) & FL_PCMAX )
#define FL_GETB( packed ) ( ( ( packed ) >> FL_BSHIFT ) & FL_PCMAX )
#define FL_GETA( packed ) ( ( ( packed ) >> FL_ASHIFT ) & FL_PCMAX )

#define FL_PACK3( r, g, b )   \
    ( ( ( r ) << FL_RSHIFT ) | ( ( g ) << FL_GSHIFT ) | ( ( b ) << FL_BSHIFT ) )

#define FL_PACK           FL_PACK3

#define FL_PACK4( r, g, b, a)  \
    ( FL_PACK3( r, g, b ) | ( ( a ) << FL_ASHIFT ) )

#define FL_UNPACK( p, r, g, b )  \
    do { r = FL_GETR( p );       \
         g = FL_GETG( p );       \
         b = FL_GETB( p );       \
    } while ( 0 )

#define FL_UNPACK3        FL_UNPACK

#define FL_UNPACK4( p, r, g, b, a )  \
    do { FL_UNPACK3( p, r, g, b );   \
         a = FL_GETA( p );           \
    } while ( 0 )

#endif

#define FL_LUTBITS        12    /* max colormap bits. 4096 entries */

#define FL_IsRGB( im )    ( ( im )->type == FL_IMAGE_RGB )
#define FL_IsPacked( im ) ( ( im )->type == FL_IMAGE_PACKED )

enum
{
    FLIMAGE_AUTOCOLOR = 0x7fffffff,
    FLIMAGE_BADCOLOR  = FLIMAGE_AUTOCOLOR
};


typedef Window FL_WINDOW;   /* unsigned long */

typedef struct flimage_text_ {
    char         * str;       /* the string itself             */
    int            len;       /* string length                 */
    int            x,         /* starting location of text (wrt image) */
                   y;
    unsigned int   color;     /* color of the text             */
    unsigned int   bcolor;    /* background color of the text  */
    int            nobk;      /* no background                 */
    int            size,      /* font size & style             */
                   style;
    int            angle;     /* in 1/10th of a degrees        */
    int            align;     /* alignment wrt to (x,y)        */
} FLIMAGE_TEXT;

typedef struct flimage_marker_ {
    const char   * name;      /* marker name                  */
    int            w,         /* size                         */
                   h ;
    int            x,         /* location                     */
                   y;
    unsigned int   color;     /* color of the marker          */
    unsigned int   bcolor;    /* aux. color of the marker     */
    int            angle;     /* in 1/10th of a degree        */
    int            fill;
    int            thickness; /* line thickness               */
    int            style;     /* line style                   */

    /* the following is filled by the library */

    void       * display;
    void       * gc;
    FL_WINDOW    win;
    const char * psdraw;
} FLIMAGE_MARKER;

#define FLIMAGE_REPFREQ  0x1f   /* report every 32 lines */

#ifndef FL_RGB2PIXEL

typedef struct {
   unsigned int rshift,
                rmask,
                rbits;
   unsigned int gshift,
                gmask,
                gbits;
   unsigned int bshift,
                bmask,
                bbits;
   int          bits_per_rgb;
   int          colormap_size;
} FL_RGB2PIXEL_;

#define FL_RGB2PIXEL  FL_RGB2PIXEL_
#endif

typedef struct flimage_setup_ *FLIMAGESETUP;

typedef struct flimage_ {
    int               type;         /* image type                    */
    int               w,
                      h;            /* image size                    */
    void *            app_data;     /* for application at setup time */
    void *            u_vdata;      /* for application               */
    long              u_ldata;      /* for application               */
    unsigned char  ** red;
    unsigned char  ** green;
    unsigned char  ** blue;
    unsigned char  ** alpha;
    unsigned char  ** rgba[ 4 ];    /* alias                         */
    unsigned short ** ci;
    unsigned short ** gray;
    FL_PACKED4 **     packed;
    unsigned short ** red16;          /* not currently supported */
    unsigned short ** green16;        /* not currently supported */
    unsigned short ** blue16;         /* not currently supported */
    unsigned short ** alpha16;        /* not currently supported */
    unsigned char  ** ci8;            /* not currently supported */
    int             * red_lut;        /* red lookup tables                */
    int             * green_lut;      /* green lookup tables              */
    int             * blue_lut;       /* blue lookup tables               */
    int             * alpha_lut;      /* alpha lookup tables              */
    int             * lut[ 4 ];       /* alias                            */
    int               map_len;        /* lut length                       */
    int               colors;         /* actual colors used in displaying */
    int               gray_maxval;    /* indicate the range of gray16     */
    int               ci_maxval;      /* max value of ci. not used,
                                         use map_len */
    int               rgb_maxval;     /* max value for rgb16 image       */
    int               level,
                      wwidth;
    unsigned short  * wlut;           /* lut for window levelling         */
    int               wlut_len;
    int               app_background; /* transparent color: in RGB        */
    char            * comments;
    int               comments_len;
    int               available_type;
    struct flimage_ * next;
    int               sx,             /* display subimage origin          */
                      sy;
    int               sw,             /* display subimage width           */
                      sh;
    int               wx,             /* display location relative to win */
                      wy;
    int modified;
    int               ( * display )( struct flimage_ *, FL_WINDOW );
    int               double_buffer;
    int               sxd,
                      syd,
                      swd,
                      shd;
    int               wxd,
                      wyd;
    const char      * fmt_name;       /* format name (ppm,jpg etc)     */

    /* annotation stuff */

    FLIMAGE_TEXT    * text;
    int               ntext,
                      max_text;
    int               dont_display_text;
    void              ( * display_text )( struct flimage_ * );
    void              ( * free_text )( struct flimage_ * );
    FLIMAGE_MARKER  * marker;
    int               nmarkers,
                      max_markers;
    int               dont_display_marker;
    void              ( * display_markers )( struct flimage_ * );
    void              ( * free_markers )( struct flimage_ * );

    /* physicalValue = poffset + pixelValue * pscale  */

    double            pmin,           /* physical data range             */
                      pmax;
    double            poffset;
    double            pscale;

    /* pixel grid distance */

    double            xdist_offset;
    double            xdist_scale;
    double            ydist_offset;
    double            ydist_scale;

    char            * infile;
    char            * outfile;
    long              foffset;
    int               original_type;

    /* hooks for application to have a chance to set some options.
       if pre_write returns -1, the output will be canceled */

    int               ( * pre_write )( struct flimage_ * );
    int               ( * post_write )( struct flimage_ * );

    /* image processing stuff */

    int               subx,           /* subimage origin       */
                      suby;
    int               subw,           /* subimage size         */
                      subh;
    int               sub_shape;      /* shape of the subimage */
    unsigned int      fill_color;     /* fill color            */
    int               force_convert;
    int             * llut[ 3 ];      /* linear lut            */
    int               llut_len;
    unsigned int    * hist[ 4 ];

    /* application handlers */

    int               total,
                      completed;
    int               ( * visual_cue )( struct flimage_*,
                                        const char * );
    void              ( * error_message )( struct flimage_*,
                                           const char * );
    int               error_code;     /* not currently used */

    int               display_type;   /* just before handing it to X      */
    unsigned short ** pixels;
    void            * image_spec;     /* additional image info            */
    void            * xdisplay;       /* the X connection                 */
    int               tran_rgb;       /* RGB color that should be transparent */
    int               tran_index;     /* index that should be transparent     */
    int               matr,
                      matc;

    /* multi-frame images */

    int               more;
    int               current_frame;
    int               total_frames;
    int               ( * next_frame )( struct flimage_ * );
    int               ( * prev_frame )( struct flimage_ * );
    int               ( * random_frame )( struct flimage_ *, int );
    int               ( * rewind_frame )( struct flimage_ * );
    void              ( * cleanup )( struct flimage_ * );
    int               stop_looping;

    /* the following are for internal use */

    FILE            * fpin;
    FILE            * fpout;
    void            * image_io;
    void            * io_spec;        /* io operation helper       */
    int               spec_size;
    int               depth;          /* the depth we actually use */
    int               vclass;
    void            * visual;
    unsigned long     xcolormap;
    FL_RGB2PIXEL      rgb2p;
    void            * ximage;
    FL_WINDOW         win;
    void            * gc;
    int               sdepth;         /* depth the server says     */
    void            * textgc;
    void            * markergc;
    void            * extra_io_info;
    unsigned long     pixmap;
    int               pixmap_w,
                      pixmap_h,
                      pixmap_depth;
    int               isPixmap;
    FLIMAGESETUP      setup;
    char            * info;
} FL_IMAGE;

/* some configuration stuff */

typedef struct flimage_setup_ {
    void          * app_data;
    int             ( * visual_cue )( FL_IMAGE *,
                                      const char *);
    void            ( * error_message )( FL_IMAGE *,
                                         const char *);
    int             ( * display )( FL_IMAGE *,
                                   unsigned long );

    const char    * rgbfile;
    int             do_not_clear;
    void          * xdisplay;
    int             max_frames;
    int             delay;
    int             no_auto_extension;
    int             report_frequency;
    int             double_buffer;

    /* internal use */

    unsigned long   trailblazer;
    int             header_info;
} FLIMAGE_SETUP;

FL_EXPORT void flimage_setup( FLIMAGE_SETUP * );

/* Possible errors from the library. Not currently (v0.89) used */

enum {
   FLIMAGE_ERR_NONE = 0,
   FLIMAGE_ERR_ALLOC = -50,     /* allocation error     */
   FLIMAGE_ERR_INVALID,         /* invalid image        */
   FLIMAGE_ERR_ARGUMENT,        /* bad argument/request */
   FLIMAGE_ERR_FILE,            /* io error             */
   FLIMAGE_ERR_INTERNAL,        /* bugs                 */
   FLIMAGE_ERR_UNKNOWN
};

typedef int ( * FLIMAGE_Identify )( FILE * );
typedef int ( * FLIMAGE_Description )( FL_IMAGE * );
typedef int ( * FLIMAGE_Read_Pixels )( FL_IMAGE * );
typedef int ( * FLIMAGE_Write_Image )( FL_IMAGE * );

/* Basic IO routines */

FL_EXPORT FL_IMAGE * flimage_load( const char * file );

FL_EXPORT FL_IMAGE * flimage_read( FL_IMAGE * im );

FL_EXPORT int flimage_dump( FL_IMAGE *,
							const char *,
							const char * );

FL_EXPORT int flimage_close( FL_IMAGE * );

FL_EXPORT FL_IMAGE * flimage_alloc( void );

FL_EXPORT int flimage_getmem( FL_IMAGE * );

FL_EXPORT int flimage_is_supported( const char * );

FL_EXPORT int flimage_description_via_filter( FL_IMAGE *,
											  char *const *,
											  const char *,
											  int );

FL_EXPORT int flimage_write_via_filter( FL_IMAGE *,
										char * const *,
										char * const *,
										int );

FL_EXPORT FL_IMAGE * flimage_alloc( void );

FL_EXPORT void flimage_free( FL_IMAGE * );

FL_EXPORT int flimage_display( FL_IMAGE *,
							   Window );

FL_EXPORT int flimage_sdisplay( FL_IMAGE *,
								Window );

FL_EXPORT int flimage_convert( FL_IMAGE *,
							   int,
							   int );

FL_EXPORT const char * flimage_type_name( int type );

FL_EXPORT int flimage_add_text( FL_IMAGE *,
								const char *,
								int,
								int,
								int,
								unsigned int,
								unsigned int,
								int,
								double,
								double,
								int );

FL_EXPORT int flimage_add_text_struct( FL_IMAGE *,
									   const FLIMAGE_TEXT * );

FL_EXPORT void flimage_delete_all_text( FL_IMAGE * );

FL_EXPORT int flimage_add_marker( FL_IMAGE *,
								  const char *,
								  double,
								  double,
								  double,
								  double,
								  int,
								  int,
								  int,
								  unsigned int,
								  unsigned int );

FL_EXPORT int flimage_add_marker_struct( FL_IMAGE *,
										 const FLIMAGE_MARKER * );

FL_EXPORT int flimage_define_marker( const char *,
									 void ( * )( FLIMAGE_MARKER * ),
									 const char * );

FL_EXPORT void flimage_delete_all_markers( FL_IMAGE * );

FL_EXPORT int flimage_render_annotation( FL_IMAGE *,
										 FL_WINDOW );

FL_EXPORT void flimage_error( FL_IMAGE *,
							  const char *,
							  ... );

/* Built-in format supports */

FL_EXPORT void flimage_enable_pnm( void );

FL_EXPORT int flimage_set_fits_bits( int );

/* Output options */

typedef struct
{
    int quality;
    int smoothing;
} FLIMAGE_JPEG_OPTION;

FL_EXPORT void flimage_jpeg_output_options( FLIMAGE_JPEG_OPTION * );

FL_EXPORT void flimage_pnm_output_options( int );

FL_EXPORT void flimage_gif_output_options( int );

FL_EXPORT FLPS_CONTROL * flimage_ps_options( void );

#define flimage_jpeg_options  flimage_jpeg_output_options
#define flimage_pnm_options   flimage_pnm_output_options    
#define flimage_gif_options   flimage_gif_output_options    

enum
{
    FLIMAGE_WRITABLE = FL_WRITE,
    FLIMAGE_READABLE = FL_READ
};

typedef struct {
    const char * formal_name;
    const char * short_name;
    const char * extension;
    int          type;
    int          read_write;
    int          annotation;
} FLIMAGE_FORMAT_INFO;

FL_EXPORT int flimage_get_number_of_formats( void );

FL_EXPORT const FLIMAGE_FORMAT_INFO * flimage_get_format_info( int );

FL_EXPORT void * fl_get_matrix( int,
								int,
								unsigned int );

FL_EXPORT void * fl_make_matrix( int,
								 int,
								 unsigned int,
								 void * );

FL_EXPORT void fl_free_matrix( void * );

/* This function is retained for compatibility reasons only.
   It returns 1 always. */

FL_EXPORT int fl_init_RGBdatabase( const char * );

FL_EXPORT int fl_lookup_RGBcolor( const char *,
								  int *,
								  int *,
								  int * );

FL_EXPORT int flimage_add_format( const char *,
								  const char *,
								  const char *,
								  int,
								  FLIMAGE_Identify,
								  FLIMAGE_Description,
								  FLIMAGE_Read_Pixels,
								  FLIMAGE_Write_Image );

FL_EXPORT void flimage_set_annotation_support( int,
											   int );

FL_EXPORT int flimage_getcolormap( FL_IMAGE * );

FL_EXPORT void fl_select_mediancut_quantizer( void );

/* Simple image processing routines */

#define FLIMAGE_SHARPEN        ( ( int** )( -1 ) )
#define FLIMAGE_SMOOTH         ( ( int** )( -2 ) )
#define FL_SMOOTH              FLIMAGE_SMOOTH
#define FL_SHARPEN             FLIMAGE_SHARPEN

enum {
   FLIMAGE_NOSUBPIXEL =  0,     /* scale with no subpixel sampling */
   FLIMAGE_SUBPIXEL   =  1,     /* scale with  subpixel sampling */
   FLIMAGE_CENTER     =  2,     /* center warped image. default  */
   FLIMAGE_RIGHT      =  8,     /* flush right the warped image  */
   FLIMAGE_ASPECT     = 32,     /* fit the size */
   FLIMAGE_NOCENTER   = FL_ALIGN_LEFT_TOP
};

FL_EXPORT int flimage_convolve( FL_IMAGE *,
								int **,
								int,
								int );

FL_EXPORT int flimage_convolvea( FL_IMAGE *,
								 int *,
								 int,
								 int );

FL_EXPORT int flimage_tint( FL_IMAGE *,
							unsigned int,
							double
        );

FL_EXPORT int flimage_rotate( FL_IMAGE *,
							  int,
							  int );

FL_EXPORT int flimage_flip( FL_IMAGE *,
							int );

FL_EXPORT int flimage_scale( FL_IMAGE *,
							 int,
							 int,
							 int );

FL_EXPORT int flimage_warp( FL_IMAGE *,
							float [ ][ 2 ],
							int,
							int,
							int );

FL_EXPORT int flimage_autocrop( FL_IMAGE *,
								unsigned int );

FL_EXPORT int flimage_get_autocrop( FL_IMAGE *,
									unsigned int,
									int *,
									int *,
									int *,
									int * );

FL_EXPORT int flimage_crop( FL_IMAGE *,
							int,
							int,
							int,
							int );

FL_EXPORT int flimage_replace_pixel( FL_IMAGE *,
									 unsigned int,
									 unsigned int );

FL_EXPORT int flimage_transform_pixels( FL_IMAGE *,
										int *,
										int *,
										int * );

FL_EXPORT int flimage_windowlevel( FL_IMAGE *,
								   int,
								   int );

FL_EXPORT int flimage_enhance( FL_IMAGE *,
							   int );

FL_EXPORT int flimage_from_pixmap( FL_IMAGE *,
								   Pixmap );

FL_EXPORT Pixmap flimage_to_pixmap( FL_IMAGE *, 
									FL_WINDOW );

FL_EXPORT FL_IMAGE * flimage_dup( FL_IMAGE * );

/* Miscellaneous prototypes */

FL_EXPORT void * fl_get_submatrix( void *,
								   int,
								   int,
								   int,
								   int,
								   int,
								   int,
								   unsigned int );

FL_EXPORT int fl_j2pass_quantize_packed( unsigned int **,
										 int,
										 int,
										 int,
										 unsigned short **,
										 int *,
										 int *,
										 int *,
										 int *,
										 FL_IMAGE * );

FL_EXPORT int fl_j2pass_quantize_rgb( unsigned char **,
									  unsigned char **,
									  unsigned char **,
									  int,
									  int,
									  int,
									  unsigned short **,
									  int *,
									  int *,
									  int *,
									  int *,
									  FL_IMAGE * );

FL_EXPORT void * fl_make_submatrix( void *,
									int,
									int,
									int,
									int,
									int,
									int,
									unsigned int );

FL_EXPORT int fl_object_ps_dump( FL_OBJECT *,
								 const char * );

FL_EXPORT void fl_pack_bits( unsigned char *,
							 unsigned short *,
							 int );

FL_EXPORT void fl_unpack_bits( unsigned short *,
							   unsigned char  *,
							   int );

FL_EXPORT unsigned int fl_value_to_bits( unsigned int );

FL_EXPORT void flimage_add_comments( FL_IMAGE *,
									 const char *,
									 int );

FL_EXPORT unsigned long flimage_color_to_pixel( FL_IMAGE *,
												int,
												int,
												int,
												int * );

FL_EXPORT FL_IMAGE * flimage_combine( FL_IMAGE *,
									  FL_IMAGE *,
									  double );

FL_EXPORT int flimage_define_marker( const char *,
									 void ( * )( FLIMAGE_MARKER * ),
									 const char * );

FL_EXPORT void flimage_display_markers( FL_IMAGE * );

FL_EXPORT FL_IMAGE *flimage_dup_( FL_IMAGE *, 
								  int );

FL_EXPORT void flimage_enable_bmp( void );

FL_EXPORT void flimage_enable_fits( void );

FL_EXPORT void flimage_enable_genesis( void );

FL_EXPORT void flimage_enable_gif( void );

FL_EXPORT void flimage_enable_gzip( void );

FL_EXPORT void flimage_enable_jpeg( void );

FL_EXPORT void flimage_enable_png( void );

FL_EXPORT void flimage_enable_ps( void );

FL_EXPORT void flimage_enable_sgi( void );

FL_EXPORT void flimage_enable_tiff( void );

FL_EXPORT void flimage_enable_xbm( void );

FL_EXPORT void flimage_enable_xpm( void );

FL_EXPORT void flimage_enable_xwd( void );

FL_EXPORT void flimage_free_ci( FL_IMAGE * );

FL_EXPORT void flimage_free_gray( FL_IMAGE * );

FL_EXPORT void flimage_free_linearlut( FL_IMAGE * );

FL_EXPORT void flimage_free_rgb( FL_IMAGE * );

FL_EXPORT void flimage_freemem( FL_IMAGE * );

FL_EXPORT int flimage_get_closest_color_from_map( FL_IMAGE *,
												  unsigned int );

FL_EXPORT int flimage_get_linearlut( FL_IMAGE * );

FL_EXPORT void flimage_invalidate_pixels( FL_IMAGE * );

FL_EXPORT FL_IMAGE *flimage_open( const char * );

FL_EXPORT int flimage_read_annotation( FL_IMAGE * );

FL_EXPORT void flimage_replace_image( FL_IMAGE *,
									  int,
									  int,
									  void *,
									  void *,
									  void * );

FL_EXPORT int flimage_swapbuffer( FL_IMAGE * );

FL_EXPORT int flimage_to_ximage( FL_IMAGE *,
								 FL_WINDOW,
								 XWindowAttributes * );

FL_EXPORT int flimage_write_annotation( FL_IMAGE * );

FL_EXPORT void flps_apply_gamma( float );

FL_EXPORT void flps_arc( int,
						 int,
						 int,
						 int,
						 int,
						 int,
						 FL_COLOR );

FL_EXPORT void flps_circ( int,
						  int,
						  int,
						  int,
						  FL_COLOR );

FL_EXPORT void flps_color( FL_COLOR col );

FL_EXPORT void flps_draw_box( int,
							  int,
							  int,
							  int,
							  int,
							  FL_COLOR,
							  int );

FL_EXPORT void flps_draw_checkbox( int,
								   int,
								   int,
								   int,
								   int,
								   FL_COLOR,
								   int );

FL_EXPORT void flps_draw_frame( int,
								int,
								int,
								int,
								int,
								FL_COLOR,
								int );

FL_EXPORT int flps_draw_symbol( const char *,
								int,
								int,
								int,
								int,
								FL_COLOR );

FL_EXPORT void flps_draw_tbox( int,
							   int,
							   int,
							   int,
							   int,
							   FL_COLOR,
							   int );

FL_EXPORT void flps_draw_text( int,
							   int,
							   int,
							   int,
							   int,
							   FL_COLOR,
							   int,
							   int,
							   const char * );

FL_EXPORT void flps_draw_text_beside( int,
									  int,
									  int,
									  int,
									  int,
									  FL_COLOR,
									  int,
									  int,
									  const char * );

FL_EXPORT void flps_emit_header( const char *,
								 int,
								 int,
								 int,
								 int,
								 int );

FL_EXPORT void flps_emit_prolog( void );

FL_EXPORT int flps_get_gray255( FL_COLOR );

FL_EXPORT int flps_get_linestyle( void );

FL_EXPORT int flps_get_linewidth( void );

FL_EXPORT FL_COLOR flps_get_namedcolor( const char * );

FL_EXPORT FLPS_CONTROL * flps_init( void );

FL_EXPORT void flps_invalidate_color_cache( void );

FL_EXPORT void flps_invalidate_font_cache( void );

FL_EXPORT void flps_invalidate_linewidth_cache( void );

FL_EXPORT void flps_invalidate_symbol_cache( void );

FL_EXPORT void flps_line( int,
						  int,
						  int,
						  int,
						  FL_COLOR );

FL_EXPORT void flps_lines( FL_POINT *,
						   int,
						   FL_COLOR );

FL_EXPORT void flps_linestyle( int );

FL_EXPORT void flps_linewidth( int );

FL_EXPORT void flps_log( const char * );

FL_EXPORT void flps_output( const char *,
							... );

FL_EXPORT void flps_oval( int,
						  int,
						  int,
						  int,
						  int,
						  FL_COLOR );

FL_EXPORT void flps_pieslice( int,
							  int,
							  int,
							  int,
							  int,
							  int,
							  int,
							  FL_COLOR );

FL_EXPORT void flps_poly( int,
						  FL_POINT *,
						  int,
						  FL_COLOR );

FL_EXPORT void flps_rectangle( int,
							   int,
							   int,
							   int,
							   int,
							   FL_COLOR );

FL_EXPORT void flps_reset_cache( void );

FL_EXPORT void flps_reset_linewidth( void );

FL_EXPORT void flps_restore_flps( void );

FL_EXPORT void flps_rgbcolor( int,
							  int,
							  int );

FL_EXPORT void flps_roundrectangle( int,
									int,
									int,
									int,
									int,
									FL_COLOR );

FL_EXPORT void flps_set_clipping( int,
								  int,
								  int,
								  int );

FL_EXPORT void flps_set_font( int,
							  int );

FL_EXPORT void flps_unset_clipping( void );

#ifdef MAKING_FORMS
#include "flimage_int.h"
#endif

#if defined(__cplusplus)
}
#endif

#endif /* ! defined FL_IMAGE_H */