What is the best method to optimize a PDF with cropped, rotated pictures?
<p>I have noticed that with cropped and rotated pictures which can happen a lot with paperless office techniques, that no tool like Adobe Acrobat or Nitro Pro can optimize away all the removed parts of the photos.  Attempting to use libraries to do so in C# is an interesting challenge but could potentially save many megabytes of blank image space, or space where multiple receipts for example were scanned then cropped into separate pages and the original images are always still stored.</p>

<p>So to the point, there is a potentially a solution with the rotate and crop and permanently save again (while adjusting offsets to not ruin alignment of OCR or other relative data).  This can be quite good in some cases but rotation represents a loss of data.</p>

<p>So why would it look better in a PDF reader?  Subpixels e.g. ClearText.  The original document rotated actually increases to monitor scale color resolution when displaying on the screen.  So it is practically cheaper disk space wise to store it unrotated then on display use more processing power to adjust it and use subpixel approximations.</p>

<p>So 2 proposals: 1) crop it without rotating it and adjust offsets - this is wasteful a little bit (worse case at 45 degree rotation) as its a rotated rectangle within a rectangle.
2) rotate and crop it while raising to a appropriate better and color resolution and using ClearText-style enhancement to do subpixel enhancement.  This seems a bit involved and it would increase the resolution while decreasing the portion of the picture which could defeat the purpose.</p>

<p>Does anyone have a better strategy or any suggestions to address this interesting, and yet seemingly common problem.  A very nice utility tool could be written perhaps doing the naïve and 2 proposals mentioned, but perhaps I am missing a yet easier and better idea?  Cutting this waste is potentially beneficial and cost saving with minimal downside if one has properly finalized their cropping decisions in PDFs.</p>