/*
 * mergesats.c:
 *
 * Copyright (c) 2002 James McKenzie <james@fishsoup.dhs.org>,
 * All rights reserved.
 *
 */

static char rcsid[] = "$Id: pole.c,v 1.2 2002/08/24 08:08:48 root Exp $";

/*
 * $Log: pole.c,v $
 * Revision 1.2  2002/08/24 08:08:48  root
 * #
 *
 * Revision 1.1  2002/08/23 18:51:25  root
 * #
 *
 * Revision 1.5  2002/08/23 17:03:58  root
 * #
 *
 * Revision 1.4  2002/08/23 08:35:08  root
 * #
 *
 * Revision 1.3  2002/08/23 08:35:04  root
 * #
 *
 * Revision 1.2  2002/08/21 23:02:37  root
 * #
 *
 * Revision 1.1  2002/08/21 21:22:44  root
 * #
 *
 * Revision 1.2  2002/08/21 16:04:15  root
 * #
 *
 * Revision 1.1  2002/08/21 16:04:07  root
 * #
 *
 * Revision 1.1  2002/08/21 12:07:29  root
 * #
 *
 * Revision 1.2  2002/08/21 09:40:55  root
 * #
 *
 */

/*  join.c


*/

#include <math.h>
#include "ppm.h"

#include "size.h"

#define N 5

int
main (argc, argv)
     int argc;
     char *argv[];
{
  FILE *ifp, *afp = NULL;


  int shift[N];
  double dshift[N] = { 0, 75, -140, 135, -63 /*,0 */  };

  gray **ipixels, maxval, **opixels;
  int i;
  long p;
  int x, y;
  int w, h;
  int n;

  ifp = pm_openr (argv[1]);
  ipixels = pgm_readpgm (ifp, &w, &h, &maxval);
  pm_close (ifp);

  opixels = pgm_allocarray (OWIDTH, OHEIGHT);
  maxval = 255;

  for (y = 0; y < OHEIGHT; ++y)
    {
      for (x = 0; x < OWIDTH; ++x)
        {
          if (ipixels[y][x] > 250)
            {
              opixels[y][x] = 255;
            }
          else
            {
              opixels[y][x] = 0;
            }
        }
    }


  pgm_writepgm (stdout, opixels, OWIDTH, OHEIGHT, maxval, 0);
  pm_close (stdout);
  exit (0);
}
