title: iTextSharp - Cropping PDF with images throws exception
body: <p>I want to provide PDF redaction functionality by using <code>PdfCleanUpProcessor</code> and the following code:</p>
  
  <pre><code>Rectangle redactionRectangle = new Rectangle(74, 503, 385, 761);
  PdfReader pdfReader = new PdfReader(sourcePath);
  PdfStamper pdfStamper = new PdfStamper(pdfReader,
      new FileStream(destinationPath, FileMode.Create));
  List&lt;PdfCleanUpLocation&gt; cleanUpLocations = new List&lt;PdfCleanUpLocation&gt;
  {
      new PdfCleanUpLocation(1, redactionRectangle, BaseColor.WHITE)
  };
  PdfCleanUpProcessor cleaner = new PdfCleanUpProcessor(cleanUpLocations, pdfStamper);
  cleaner.CleanUp();
  pdfStamper.Close();
  </code></pre>
  
  <p>This works fine on PDFs with no images, but PDFs with images cause exceptions. </p>
  
  <p><a href="https://www.dropbox.com/s/i76q8j1n5b0kdtv/1.pdf?dl=0" rel="nofollow">Running on the linked file throws:</a> </p>
  
  <blockquote>
    <p>The color depth 1 is not supported.</p>
  </blockquote>
  
  <p><a href="https://www.dropbox.com/s/i8bg76033oj5bug/2.pdf?dl=0" rel="nofollow">And running on the linked file throws:</a> </p>
  
  <blockquote>
    <p>Object reference not set to an instance of an object.</p>
  </blockquote>