I am implementing photo album application same as default photo album application in iphone.
can any body suggest me how to start?
I've written a simple and easy to use photo browser called MWPhotoBrowser. I decided to create it as Three20, while very good, was too heavy/bloated as all I needed was a photo viewer. Take a look:
MWPhotoBrowser can display one or more images by providing either UIImage objects, or URLs to files, web images or library assets. The photo browser handles the downloading and caching of photos from the web seamlessly. Photos can be zoomed and panned, and optional (customisable) captions can be displayed. The browser can also be used to allow the user to select one or more photos using either the grid or main image view.
Have a look at the Three20 project started by Facebooks Joe Hewitt, it contains several reusable controls like a photo viewer which mimics the iPhone's Photos app.
"TTPhotoViewController emulates Apple's Photos app with all of its flick n' pinch delight. You can supply your own "photo sources", which works similiarly to the data sources used by UITableView. Unlike Apple's Photos app, it isn't limited to photos stored locally. Your photos can be loaded from the network, and long lists of photos can be loaded incrementally."
http://github.com/facebook/three20/
Related
When using the Facebook Graph API and including a Picture with a post, the picture always appears as a small thumbnail. Is there a way to make the picture larger like it appears when you upload a photo and share it?
No, the size of that photo is controlled by facebook and the only thing you can do is playing around with the relative size of the photo you use so that it would look slightly bigger (you should use pictures with landscape layout as opposed to portrait to get a 'slightly' bigger photo.
The hack you can use to do that is what apps like Instagram and Path did: Each time someone uploads a photo, they upload the photo to an album named "Instagram/Path photos" and include the link to the original photo in the caption (in your case,the link to the original article).
However, in order to do that, you users must grant you additional permissions on Facebook and they may not like the idea of uploading photos to another album, so I (personally) wouldn't go that way.
Is there any way to load all the images in an album in Facebook? As soon as a person views the first image, the rest of the images should be automatically loaded in background. How to do it? Javascript? or any other language?
yes there is, its a greasemonkey (javascript) add-on called Facebook Fixer. firstly download greasemonkey then the facebook fixer, then you have to enable it on the page you have the album on.
Reload the page, you should be able to see that there are new links at the top now, click "show big pictures" and there you have it.
I would like to make frequently changes for the contact's image on the iPhone.
This app: Photo Phonebook, did it with facebook profile pictures.
In the app, there are automatics updates of contact's image:
Next time a Facebook friend calls, their Facebook photo appears on your iPhone. It also appears in the address book. When your friends change their profile photos on Facebook, they change on your iPhone as well.
Because there's no background processing for syncing contact images on the iPhone, I assume that they used some kind of a link or 'pointer' to the fb image.
Is it possible to put a link to image instead of the image itself? and every time the user access the same contact, the image is loaded from external link?
Checkout this post on Asynch Image View. I have used this code and it works well.
AsyncImageView derives from UIView and asynchronously fetches the image at the configured URL.
I think that it is really possible. Our application did the same. We store the link to the Facebook photo. Whenever, user need to view the photo, we downloaded it. You can use asynchronous method like Cannoade's suggestion or just write some few multithreaded code yourself to do asynchronous. That's easy.
Another suggestion is that you should cache your image and when you need to get the new photo, check your image's link to see if the avatar has been changed. Facebook changes the user's avatar link whenever user changes the avatar so if you check the link, you can know if the cache is out of date not.
I am trying to count total photos on the iphone and get the total filesize. What is the best way?
At least in 2.x SDKs, you can't access actual photo files programmatically from code. However, you can access thumbnails of photos which you can use to get a count of photos.
Original photo themselves are in a special database file (/private/var/mobile/Media/Photos/Photo Database) and thumbnail pictures are in a directory (/private/var/mobile/Media/Photos/Thumbs).
Photos can be accessed only through interactive UIImagePickerController. Reverse engineering Photo Database file format is the only way I can see that would give you an access to original photo files programmatically.
I haven't checked the situation for 3.0 SDK, it might give you some API to access photos programmatically.
I have to create same functionality as facebook has does like all the photos display at one view and from that user can choose photo and it goes to large photo. This photos are showing very fast. I have 5 photos from web but it take so much time. Does anyone know how they shows photo very fast.
I don't know the answer but I suggest you look at the three20 source code on github. Joe Hewitt (who wrote the Facebook app) published much of its code including the photo view. There is also a Google group that discusses three20.
I don't know about the iphone app in particular, but I do know that the main facebook website prefetches images in photo albums.
Facebook creates multiple sizes of each photo when it is uploaded. They also convert all the photos to png I'm pretty sure, likely reducing the file size of the original photo. I know creative has often complained about the "quality" of photos after uploaded to Facebook.
This allows them to deliver the appropriate sized image (both dimensions and file size) for quick display rather than delivering a full sized image and having the client resize it.