Saving custom image (non-JPEG) to iPhone Photos directory - iphone

I'm wondering if it's possible to save a non-JPEG file (e.g. PNG) to the iPhone Photos album. I'm trying to do this in order to save a lossless image. Currently, I'm saving to the application bundle's document folder, but I'd like to be able to save to the iPhone Photos album so the images may be viewed later (without explicitly copying them out of the bundle). The function UIImageWriteToSavedPhotosAlbum will not work because it writes a JPEG file.
Thanks

Apparently, you can use a workaround, I've found it right here on SO.

Related

How to get all PNG files from user's photo library

Is there a way to get all PNG files from the user's photo library? I don't believe it's possible to set query constraints on UIImagePickerController.
Is there anything I can do with the Photos framework? I've been looking into using PFFetch, but I can't seem to figure out if it will do what I need.

save profile image inside app using the built in camera

I have an app that contains a profile of the user.
In the profile editing, he has an option to take a photo of himself, then that photo should be saved in his details and be presented in certain places in the app.
Is there a way to internally save an image (not in his phone's photo gallery, but inside the app itself, so he cannot delete the photo through the phone), and then fetch that image every time I need it?
I understand I cannot use CoreData to save images, so I am wondering if there is an easier way to get it done efficiently.
Or must I do that in a server?
not in his phone's photo gallery, but inside the app itself
You can't store anything at runtime "inside the app itself". But the app has a sandbox, a folder area belonging to you alone, where you can store any file you like — in the Documents folder or the Application Support folder, for example. So why not just use that?

How to save a large (60mb+) image to photo library?

I know the various ways to save a UIImage to the photo library:
UIImageWriteToSavedPhotosAlbum
ALAssetsLibrary
However, my images are HUGE (60mb+), so bringing them into memory is not possible. I can download the images by streaming them to disk, and even use imageWithContentsOfFile to take a peek (although that is kind of unnecessary given screen size).
But I want the user to be able to save these images for later. Is there anyway for me to get these large images into the photo library? Do I just have to keep them stored locally inside the app sandbox?
I believe that there is no point at storing them at the photo library, since it is designed to be viewed on the device and theres no point at viewing an image so big. If you want to let the user see the image then i suggest you create a preview and save THAT version into the photo library. If you want to let the user transfer them from the device to the computer there is a special folder in your app bundle which will allow those pictures to appear when using itunes and selecting your application. then he can transfer those pictures to his computer. Also could you elaborate on the characteristics of the images? format, dimentions, purpose, etc.

Saving images inside iPhone application without using database or server side saving technique

I am developing an application which requires saving images in the "saved folder" of iPhone Photo album after performing some animations on ImageViews. Is it possible to save the incomplete images temporarily in the iphone application without using database or server side saving technique, so that user can use it for future use and only completely changed ones should get saved in Photo Album? If yes then it would be a great help to get any code or suggestion.
Thanks in advance :) !!!!
Sure, images can be converted to NSData objects, which can then be written to a standard file. Check out UIImagePNGRepresentation() and -[NSData writeToFile:atomically:].
You can then save to the standard native Photo album application using the technique described here (from a UIImage instance):
How to save picture to iPhone photo library?

Is there any way to save an image an default.png programmatically on the iphone?

I writing an app for the iphone and I would like to save an image from it as the default.png for the next invocation. Is this possible? It seems as if the sandbox doesn't allow you to overwrite anything in its local filesystem.
No, you can't. It used to be possible to make Default.png a symbolic link into your Documents folder, then to rewrite the location it pointed to, but functionality was removed in 3.0. You should file a bug with Apple explaining your needs.
No you cant, what you can do is save the image data to a file or using core data and then retrieve it for use.
So you can do something like
if(dataIsThere)
//use that data for image
else
use the default