// prototypes for imager.C
//
// by: Patrick Reynolds <patrickr@virginia.edu>

#ifndef IMAGER_H
#define IMAGER_H

#include "config.h"

void write_ppm(FILE *output, unsigned char *buf, int width, int height);

int get_brightness_adj(unsigned char *image, long size, int &brightness);

void get_rgb_adj(unsigned char *image, long size, int &red, int &green,
  int &blue);

void do_rgb_adj(unsigned char *image, long size, int red, int green,
  int blue);

void allocate_rgb_palette(int size, int pal[][3], int rgb[][3]);

unsigned char *rgb_2_pal(unsigned char *image, int width, int height,
  int size, int pal[][3], int rgb[][3]);

unsigned char *raw32_to_24(unsigned char *buf, int width, int height,
#ifdef DESPECKLE
  int nospecks = 1);
#else
  int nospecks = 0);
#endif

unsigned char *despeckle(unsigned char *image, int width, int height);

#endif
