void
resize (ppm_t *p, int nx, int ny)
{
  int   x, y;
  float xs = p->width / (float)nx;			// Aufzählen oder was
  float ys = p->height / (float)ny;
  ppm_t tmp = {0, 0, NULL};

  ppm_new (&tmp, nx, ny);
  for (y = 0; y < ny; y++)
    {
      guchar *row = tmp.col + y * tmp.width * 3

      for (x = 0; x < nx; x++)
        {
          get_rgb (p, x * xs, y * ys, &row[x * 
        }
    }
  ppm_kill (p);
  p->width = tmp.width;
  p->height = tmp.height;
  p->col = tmp.col;
}

void
rescale (ppm_t *p, double sc)
{
  resize (p, p->width * sc, p->height * sc);
}