Preview app security: How does cropping work?

Discussion in 'Mac Apps and Mac App Store' started by fessen, Aug 8, 2013.

  1. fessen macrumors member

    May 4, 2011
    When you crop an image in Preview then resave the newly-cropped image, what happens to the part of the image that was cropped off? Is it marked as recyclable and "sent" to the trash, so that when you secure-empty trash it gets erased? Or is it maintained on the hard drive (along with the rest of the image that hasn't been cropped), but now just marked as non-displayable?
  2. simsaladimbamba

    Nov 28, 2010
    Let's say you open an image with 1000 x 1000 pixels in preview, crop it via the built in tool (CMD+K) to 500 x 500 pixel in the middle and then save it as new image or file, the part that has been left out is nowhere to be stored except the original image, since that is the image you took it from.
  3. fessen thread starter macrumors member

    May 4, 2011
    If you Save (CMD-S), as opposed to Save As New, the newly-cropped image, and you subsequently secure empty trash, do those cropped pixels get written over? I don't know how Save works. Does a Save command cause the currently active image data to be COPIED to a new physical location with the old location being marked as dead, or does it leave the data in the same place but move the start-here and end-here tags for the active data? If it's the latter, does a secure empty trash command include the cropped out data in the secure erase?

    (I suppose this question applies to other software as well, such as Pages and other word processors, although I guess different programs may vary in how they deal with these issues.)
  4. fhall1 macrumors 68040


    Dec 18, 2007
    (Central) NY State of mind
    So - what you really want to know is if there's a "history" stored with the newly saved cropped image file where someone could "resurrect" the cropped away part later on?
  5. fessen thread starter macrumors member

    May 4, 2011
    I suppose, in a way. But not so much a history as the actual data itself. When you crop, does the data get destroyed once you secure-empty trash or is it just hidden from view? Could the data be reconstructed after a secure-empty trash using data-recovery software?
  6. thekingofnerds, Aug 14, 2013
    Last edited: Aug 14, 2013

    thekingofnerds macrumors regular

    Jun 26, 2013
    If you do just "save" on lion and above the old version will still be available through the "versions" feature. If you save as new/export it'll make an entirely new file, and you can subsequently delete the old one.

    Another option is crop the image, then duplicate (via finder) the image. This will also make an entirely new image, which will let you erase the old one.

    Either way, when you crop an image in preview it doesn't securely erase any of the old data - it just puts the new data right overtop. If your crop results in less block usage in the filesystem, any unused blocks may be marked as free, but they wouldn't be "erased".

    One thing to keep in mind: If you do a major crop and then "securely erase" the image, it may or may not erase all of the old data as well (depends if the blocks and block usage are the same).

    On a side note - if security is this much of a concern why not use full disk encryption? Then none of this would matter. With file vault 2 and a modern SSD there's virtually no performance penalty.
  7. fessen thread starter macrumors member

    May 4, 2011
    Thanks for the response.

    (It's not that security has been such a concern, I am just curious about the process. And still running older hardware and software, so no File Vault 2 or SSDs.)

Share This Page