How to save an image in application sandbox

Discussion in 'iOS Programming' started by sandhya.rai, Apr 14, 2009.

  1. sandhya.rai macrumors newbie

    Jan 12, 2009

    I want to know how to edit and save the particular image from photo gallery to application sandbox and how to read the images too.
    I got stuck at this point

    thanks in advance
  2. kainjow Moderator emeritus


    Jun 15, 2000
    Look at UIImageJPEGRepresentation() and UIImagePNGRepresentation()

    and then once you have the NSData, you can writeToFile:atomically:

    To get the path to where you can save it, use NSSearchPathForDirectoriesInDomains()

Share This Page