4

I am merging some png files to a uiimage and I followed this thread ( UIImageWriteToSavedPhotosAlbum save as PNG with transparency? )

and tried to save the result as a png file by replacing this code with my image: [self composeImageWithWidth:100 andHeight:100)..

When I test this using simulator, I go to the folder in application support and find the png there. However when I test this on a real device, I cannot find the png file in my photo album.

What could be going wrong? Perhaps the paths of photo album?

Thanks for the answers

Community
  • 1
  • 1
tiw
  • 535
  • 1
  • 6
  • 22

1 Answers1

4

You can use this function:

UIImageWriteToSavedPhotosAlbum(UIImage *image, id completionTarget, SEL completionSelector, void *contextInfo);

You only need completionTarget, completionSelector and contextInfo if you want to be notified when the image is done saving, otherwise you can pass in nil.

More info here

Mehul Mistri
  • 15,037
  • 14
  • 70
  • 94
  • I was already using this but it doesn't save as a png file.. That's why I used the other example. But then the place is not photo album of the iphone. This is what I am trying to solve :] – tiw Jan 20 '12 at 16:27
  • 1
    This only saves as a JPG not as a PNG – Tony Million Sep 06 '12 at 11:14