// ifslib.c
int min_int(int a, int b);
int max_int(int a, int b);
void bail(char *msg);
void* emallocz(ulong sz);
void* emalloc(ulong sz);
int get_fd(char *fname, int mode);
int read_atoi_from_file(char *file);
int write_int_to_file(char *filename, int i) ;
uchar* read_channel_data(char *filename, long datasize);
char *write_channel_data(char *filename, long datasize, uchar* data);
int get_width(void);
int get_height(void);
int set_width(int w);
int set_height(int h);
uchar* read_channel_rect(char *filename, Rectangle *r) ;
char* write_channel_rect(uchar *dry, uchar *selection, char *filename, Rectangle *dst, uchar *wet, uchar *alpha);
void clip_rectangle_to_bitmap(Rectangle *r) ;
Rectangle* rectangle_from_txt(char *txt);
uchar get_pixel(uchar *data, int width, int height, float x, float y, int wrap);
|