title: Cropping a .ppm file in C
body: <p>I'm working on a C program that crops .ppm files from a starting point pixel (x,y) (top left corner of cropped image) to an end point pixel (x+w,x+h)(bottom left corner of cropped image).</p>
  
  <p>The data in .ppm files is of the following format:</p>
  
  <p>r g b r g b r g b r g b r g b r g b<br>
  r g b r g b r g b r g b r g b r g b<br>
  r g b r g b r g b r g b r g b r g b<br>
  r g b r g b r g b r g b r g b r g b </p>
  
  <p>Is there a simple way, wich avoids the use of 2 dimensional arrays, to do this using scanf()?</p>