/*
 * PHOTOQUANTIGRAPHIC imaging toolkit (http://wearcam.org/orbits)
 * See also, http://wearcam.org/lightspaces/index.html
 * etc...
 *
 * Related references: Proc. IEEE Nov. 1998, etc.. http://wearcam.org
 *
 * photoquantigraphic image compositing toolkit
 *
 * pnmuchar2double.c - converts byte image to double precision image
 * to compile: gcc -Wall pnmuchar2double.c -o pnmuchar2double -lm
 * to run: pnmumath v080.ppm -o pork.ppm
 *
 * steve; from ndf's diff.c, with help of sbeck on parsing input images
 *
 * bugs: writes one too many pixels, e.g. color image is 24 bytes too long
 *
 */

#include <stdio.h>

struct image_params {

  char * filename;
  int width;
  int height;
  /* max_val is the maximum colour component value - often 255 */
  int max_val;
  /* type is either '5' to indicate a P5 file or '6' to indicate a P6 file */
  int type;
  unsigned int numberOfImages;
  float exponent;
};

void get_image_params(FILE * ifs, struct image_params * params);

void get_image_type(FILE * ifs, struct image_params * params);
void get_image_params_preserve_comments(FILE * ifs, struct image_params * params,FILE *ofs);
