I am using UIImageWriteToSavedPhotosAlbum() method to save images in photo library.I am calling webservices to get images and saving it in photo library but It is creating copy of images because webservice is calling no. of time.
How can I replace existing images from Photo Library?
Thanks
No you can not, since this will allow you to update user images with their consent.
Apple is very restrictive about these kind of things, just image you are overwriting all the images by adding some banner. There is noway the user can undo this.
Related
I am building a game related with the picture of the client from his album.
I need him to authorize access his album, but can I use his pictures?
For example, imagine a game of finding errors. I use one of his pictures in my app, change 7 objects, and ask him to find the changes.
Is it possible?
The user will be able to give you access to their pictures. But in terms of identifying objects in the picture and making changes to them, you will have to code in some pretty advanced image processing functionality.
Like the title says. In an iPhone, in what directory do Instagram/Facebook (and similar applications) store the images they downloaded at runtime?
When is that directory wiped?
For non permanent images (e.g. post thumbnails but not user profile pics) I would imagine they get stored in the <Application_Home>/Library/Caches, other content probably goes in Documents
You don't need to know what facebook or instagram do, but If I understand your question right, you want to download images asynchronously from web and cache them. For that u can use a third party class to handle the caching instead of writing your own, I would suggest SDWebImage.
Am wondering if i can attach an image to my SMSComposerSheet (like the message application in the iPhone does). I've already implemented image picking (from library and camera)
So may be i need some thing to add in the displaySMSComposerSheet method to allow That.
One other thing, i want to do the same thing with mails sending, but i think that i couldn't, so i was thinking about saving the image into the application's sandbox then attach it to the mail. but i don't know how to do that :s
Thanks in advance
To try use this https://agilewarrior.wordpress.com/2012/02/08/how-to-attach-an-image-from-your-photo-gallery-and-send-it-as-an-image-on-iphone/
I want to duplicate an image from the Photo Library but I want to check in the future if I already have imported this image.
Immagine this scenario.
I have a photo in my Photo Library.
I import it in my app by making a copy of it.
I remove this photo from my library.
At a later time I reinsert this picture to my photo library (Same photo from iPhoto, just didn't synch it's album before and I have now)
Is there a unique identifier that I can use to compare the two pictures? is the URL unique?
Or do I have to look into the metadata and try to match it?
If so, what would you suggest? Created Data and location? Just created Date? Size?
Thanks for your advice.
Observations
I've been working with similar functionality, so this is what I know:
Each photo inserted into the photo library will have a unique URL (this means if you insert an image, delete it, then insert it again, even if it is the same image, it will have a new URL).
There is no straight forward way of knowing whether an image is a duplicate of a previous image or not.
I don't think you are trying to do this, but I will warn you that you cannot delete an image programmatically from the iPhone Photo library.
Solutions
I really only have one way of handling this: Create a hash of the photo and store the hash somewhere. If the photo inserted is the exact same photo as before, it should give you the same hash. You can use that hash comparison to determine if you are using the same photo or not. This is the method that I am using and it seems to work reliably for the most part. I have noticed some discrepancies, but these usually involve my work hashing the files before they are added to the photo library (I have noticed that the saved photo can be different from the photo that is being saved).
I hope this information helps. Let me know if I've missed anything or you notice different results in your work.
I have some part of application that save user data like name, address and photo. I have solve problem to take a photo from photo library.
Because that's only small database, I use NSUserDefaults to save data.
But I don't know how to save photo from photo library that I put in UIImageView...
Please give me some help..
Is it possible to use NSUserDefaults to save that photo??
I would consider using NSUserDefaults to store the image name rather than the data. You should be able to retrieve the image from the photo library no problem as long as you have the filename you need.