How to give custom name to a picture in iphone - iphone

I am new to iPhone programming. Does anyone know how to give custom name to a picture which was taken using the mobile camera? After that the picture has to be saved along with that name in the photo gallery.
Can anyone figure out a solution for this?
Thanks

Add MetaData to UIImage. Same metadata of UIImage can be used to know images's information.
Refer Get Exif data from UIImage.
Refer UIImagePickerController and extracting EXIF data from existing photos

You can't do this.
Because iOS saves it with a asseturl.
You can't add your meta data along with an image in the photolibrary.
And you can only access the photo using assets library.

Related

Is it possible to change the album of a photo in the camera roll?

I would like to take a photo from the Camera Roll and assign it to a certain album. I don't want to delete the photo, I just want to change that little tiny attribute in which album it belongs.
According to the AlAsset Class Reference, photos are only editable if they were created by my own app. Does this mean that I can't change their album?
Would the only way to assign a photo to an album to make a duplicate of it, as suggested in this post? Is there anyway to not make a duplicate of a photo and just put it into an album?
If I put photos from my camera roll into albums or events with iPhoto on my Mac, they will disappear from the camera roll. Is there any way to do the same via the iOS SDK?
I hope i understand your question corectly, but I think the best way to do it would be to save the taken photo in a custom album. Martin tudorov has written a tutorial on this subject which I find very useful. It is designed for iOS 5 but I don't think there is much of change and you can tweak it for iOS 6 if you want. There is a sample project as well. Anyway here is the link to the tutorial which explAns it all and I hope it helps you solve your issue.
http://www.touch-code-magazine.com/ios5-saving-photos-in-custom-photo-album-category-for-download/
noļ¼Œthere is no way. But you can do it by using private API.

Image save issue in custom album as well as default Camera Roll in iphone

I want to save image in Custom Album from my App. i know it possible in iOS 5 and up.
i am done with this functionality with the reference link
From the reference link image save successfully in Custom Album but issue is that image Save in Custom Album as well as Camera roll . How can i ignore to save in Two folder ?
any one have idea about that ? Thanks in Advance !!!

Can I detect if an imported ALAsset photo was taken via screenshot?

I have an imagePickerController that is used for importing photos from library into my app.
When in ALAssetsLibraryAssetForURLResultBlock, I'm trying to find out if the ALAsset I've got in the block is a photo taken as a screen-shot or is it a "genuine" photo, taken by the camera.
I've tried to go through the ALAsset's metadata dictionaries but couldn't find any flag / indication that might fit.
Anyone have any ideas?
For screenshot, its UTI is always a "public.png" and same size as screen (be sure you have multiply [UIScreen scale] on screen bounds width and height), just need to check these 2 metadata, you can easily identify screenshot.
Add MetaData to UIImage while saving to Photo Library. Same metadata of UIImage can be used to know if its screenshot or not.
Refer Save_Photo_to_Album_with_Metadata
Well, I was researching and experimenting .. and the closest solution I've found is based on the fact that iPhone screenshots don't yield EXIF records (while all other generated photos do generate them).
Therefore, once a photo is selected in the picker, I'm checking if the photo's metadata consists an EXIF record and if it doesn't - I conclude that the photo was screenshot.
I found it's the "as good as it gets" solution for now, although it's not an official one.
Cheers.

Detecting image location of the picture in iPhone

I am working on a camera app in which the pictures I take should store the location as to where they were taken. So maybe after a while, if I want to know where a particular picture was taken, I should click on a button, say above my photo album, which should re-direct me to a mapview. There, it should show the places where i've taken all my pictures, with an album for each place.
Any idea on how to make this work?
here are some links which is related to your question.
Get Exif data from UIImage
UIImagePickerController and extracting EXIF data from existing photos
Add MetaData to UIImage. Same metadata of UIImage can be used to know images's location.
Refer Save_Photo_to_Album_with_Metadata

iPhone:Image API in iPhone

Is there any Image API available in iPhone?? so using that API I can develop a functionality to get all information of that photo in iPhone.
Thanks in advance.
You need to look at the ImageIO framework
http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/ImageIOGuide/imageio_intro/ikpg_intro.html#//apple_ref/doc/uid/TP40005462
yes, since IOS4 http://developer.apple.com/library/ios/#documentation/AssetsLibrary/Reference/ALAsset_Class/Reference/Reference.html
depending on what you want exactly, this deals with the camera output.
The question is very fuzzy: please make it more exact.
if you want to get information about the size of the image, orientation, type etc, you can use the UIImage and CGImage classes which will give you information about the image itself. (size, colors, pixel size etc)..
If you want to get or access pictures in the Photos app of the iphONE, ALAssetsLibrary is what you need to read about - you can save and get images and videos from the iPhone's native album.
If you want the metadata saved alongside each image - like the location it picture was taken, the lens size, date taken etc.. - I am unsure how one gets that data.