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.
Related
I haven't found any documentation on this or seen this done before, but is there anyway I can, instead of just choosing one image with UIImagePicker, load the user's albums, and then after selecting an image, that image displays, but also allows me to scroll left and ride to see all the images before and after that image?
I know I can use a multiple image picker, but that involves importing all the user's photos, and if the user has hundreds of photos, this would take a lot of time. I'm looking for similar functionality to the real photos app- the performance and everything. Any ideas?
Yes, you can. Look at the documentation for ALAssetsLibrary. This will allow you to enumerate all the user's image (and video) libraries. From this, you get ALAssets, which you can ask for their default ALAssetRepresentation. This one, in turn, you ask for its CGImage, from which you can create a UIImage.
Enumerating Libraries and Assets is done in blocks, which can easily be done in the background.
Use the assets library: http://developer.apple.com/library/ios/#documentation/AssetsLibrary/Reference/ALAssetsLibrary_Class/Reference/Reference.html
An instance of ALAssetsLibrary provides access to the videos and
photos that are under the control of the Photos application.
The library includes those that are in the Saved Photos album, those
coming from iTunes, and those that were directly imported into the
device. You use it to retrieve the list of all asset groups and to
save images and videos into the Saved Photos album.
note: only available in ios 4+
I have been using UIPickerController to get the pics from my Built-in-Gallery into my own Application, But the issue is that the delegate related to that UIPickerCOntroller get only one pic at a time and returns me only one image. So i need to get the images one by one from PHotoGallery.
Now i want to implement my own Photo-Gallery so that i could get multiple images from Built-In photo Gallery.
Can you guys guide me how to access Builtin Gallery photo Folders and fetch all images from there into my Array so that i can make my own Photo Gallery with Multiple Selection Option
Or PLease tell me if i can manage the Multiple Selection Option from UIPickerController.
I guess Apple should provide us atleast this sort of feature that we can select multiple photos at a time from Photo gallery.
PLease guys Can u guide me with some code from any of these two Options
Thanks
you want to use the Assets Library framework. take a look at this blog post for more details:
http://www.fiveminutes.eu/accessing-photo-library-using-assets-library-framework-on-iphone/
I'm using source code from apple (SquareCam) and I would like to figure out how I can use the photos taken in that app and see them in a library (like the photos app) without having all the other photos the user has taken elsewhere like in the regular camera.
I'm not too great at making apps yet so I'm pretty noobish.
I've gotten as far as opening the photo library but nothing else. no viewing individual photos or the options such as emailing, messaging and what not.
Don't think you can do that. It either all photos or no photos...
You can of course save the photo in your own documents directory and write your own photo viewer - there's quite some code and frameworks around that do most of the job, see e.g. the answers to this so question:
Open source photo viewer for IPhone
I have been trying to figure out how to do this for most of the day, but I haven't been able to find much help. We have this multimedia app that allows users to view pictures, videos, and music/ringtones about the particular subject. I know you can save images using UIImageWriteToSavedPhotosAlbum and you can save a video file using UISaveVideoAtPathToSavedPhotosAlbum. But I can't figure out how to allow the user to save an audio file. All the files are stored within the app, so its not like I'm trying to stream or download them from the internet. Does anyone have any pointers on how to do this?
The official SDK only allows you to retrieve information with MPMediaLibrary, no write access.
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.