picking image without UIImagePicker - iphone

I m new in iphone.I need to know that how to get image from library without using UIImagePicker controller in iphone.
i m picking image from library through UIImagePicker and store image name in Database but i want to fetch that images back from library with name without UIImagePicker controller.
can anyone tell me how to do so?

The best way is uiimagePickercontroller. Or else You can save it in your database n retrieve it n display it on UIActionSheet as it will give look of imagepicker without using it.

First of all , using UIImagePicker controller is the best way to do this but imposes UI restrictions.
You can use ALAssetsLibrary to pick up images and show it in your own UI.
Third and the most dirty technique would be to pick the image from imagepickercontroller and save it in your documentsDir to pick from there in future(I would not recommend this technique but this is a way to do it without imagepickercontroller).

You can try NSFileManager to access files of the camera directory /User/Media/DCIM/. And then open the files and loading them into UIImageViews. Not sure on how Apple would react on this as you're accessing files outside your apps sandbox.

Related

multiple images in imagepicker

I'm relatively new to XCode and I m building Photo Collage App ..
I don't understand how to allow the user to pick multiple images from the UIImagePickerControler to create their collages.
UIImagePickerController only allows one image to be selected at a time.
You have to use something else for multiple images to be selected in one go.
For my own projects, I use ELCImagePickerController.
Unfortunately, you can not select multiple images with UIImagePickerControler. But you can use ELCImagePickerController for this purpose.
Use ALAssetsLibrary instead of UIImagePicker...
read ALAssetsLibrary class reference on http://developer.apple.com/library/ios/#documentation/AssetsLibrary/Reference/ALAssetsLibrary_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40009722

Accessing next asset from UIImagePickerController

I'm using the UIImagePickerController to choose an image, and display it to the user immediately. However, I want the user to be able to swipe, and the next image from the album appears. The question is, how do I access the next image in the album after the initial user-selected image, programmatically?
With UIImagePickerController you just can't.
You need to use the ALAssets Library for that.
See this example: Accessing photo library using assets library
Best,
Christian

how can i get images from local folder using UIimagePicker controller

hi i am new to iphone. what i need is i have to display list of images as grid,for that i found UIimagePickerController. But there is tutorials for getting images from gallery and camera album for UIImagePickerController .But i need the images that are getting from a local folder containing images (means folder that is in project) and display them as grid using UIImagePickerController how can i done this. pls help me. thanks in advance.
You can't do this using UIimagePickerController. You have to implement your own grid-like table view.
UIImagePicker only gives you the images that are stored in Photos.
You wont be getting the images stored in local folder in UIImagePicker.
So you have 2 options
1. Save the images in Photos instead of your local folder
2. Create a grid like table view (as told by #beefon).
hAPPY cODING...

UIImagepickercontroller: is it possible to change the sort order of the images in camera roll?

Basically the app im working on would be a lot less of a pain if users didn't have to scroll to the very bottom of their camera roll to get their most recent photos, I want the most recent at the top, wouldn't this make sense anyway? Not sure why apple designed it this way, or if im just not realizing something.
Thanks
nick
If you don't mind adding an extra step of selecting the camera roll from an album list you can try changing your sourceType from SavedPhotoAlbums to PhotoLibrary:
imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
After selecting the desired album, the next photo selection view will show the most recent images at the bottom.
There is no way to customize UIImagePickerController in this way, but as of iOS 4.0, you can basically build your own image picker in any way you like using the AssetsLibrary framework.
You can get images, using ALAsset in an arry, and then can sort them as you want and use in table view or collectionview to build your own custom album

How to make UI Image Picker Controller read a custom source type in iPhone

I have to create a photo gallery app in iPhone. It should function same as the Photos app which is shipped with iPhone. But it should show the images which I package with the app.
UIImagePickerController reads only the following source types.
UIImagePickerControllerSourceTypePhotoLibrary,
UIImagePickerControllerSourceTypeCamera,
UIImagePickerControllerSourceTypeSavedPhotosAlbum
I was thinking of adding the images bundle to the resources group in Xcode and make UIImagePickerController to read them and display.
Looking at the class references I found UIImagePickerController reads only from the resources mentioned above. Which means it can only pick the images from camera roll OR saved photo gallery OR allow user to take a pic and use it.
Does anybody know how to make UIImagePickerController read from custom source type or images?
OR
How to create a photo gallery app in iPhone :-)
Thanks,
AJ
I don't believe it is possible to make the UIImagePicker pick images from your own source. You will have to write the picker yourself (which, performance aside, doesn't seem to hard... Just a couple of UIImageViews in a UIScrollView).
Just today I started a open source UIImagePickerController clone, it is not perfect but it works quite ok. Feel free to fork http://github.com/jeena/JPImagePickerController