2

Google's developer guide explains how to upload photos to the Picasa Web Albums, but how do I download the image file in Java so that I can save it on my local machine?

asked Dec 23, 2010 at 4:18

1 Answer 1

0

I don't really have any familiarity with the Picasa Web Albums API, but this is what I think may work by just looking at the Javadocs:

// read all photos from an album
URL feedUrl = "https://picasaweb.google.com/data/feed/api/user/username/albumid/albumid";
AlbumFeed feed = myService.getFeed(feedUrl, AlbumFeed.class);
for(PhotoEntry photo : feed.getPhotoEntries()) {
 MediaSource mediaSource = photo.getMediaSource();
 InputStream photoInputStream = mediaSource.getInputStream();
 // read from the photoInputStream here to get contents of photo
}
answered Dec 23, 2010 at 5:20
Sign up to request clarification or add additional context in comments.

1 Comment

I apologize for the self-comment, but you can use the MediaSource.getContentType() method to figure out what type of file you have.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.