Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Learning is a never ending thing and just one life is not enough to learn all the things you want to learn. The ocean of knowledge is very, very deep. This blog has been created for the same objective. I write on things which I come across in my daily life and feel to share it with the people across the world. The blog publish articles on SQL Server, SSIS 2005, SSIS 2008 alongwith other useful stuff which are good to know for the professional life.
Browse by Tags · View All
Google SpreadSheet API 12
YouTube API with .NET 7
PEGA Tutorials 6
PRPC Tutorials 6
Google BigQuery 6
Google Analytics API in .NET 6
Google Cloud Services 5
Core Reporting API with C# 4
Good Data API with Picasa 4
Ms-Excel function 4

Archive · View All
June 2012 17
October 2012 12
May 2012 12
August 2012 11
March 2013 10
July 2012 10
December 2011 9
January 2012 7
September 2012 6
February 2012 6

SinghVikash Blog

How to upload image in Picasa Web Album with Google Data API?

May 14 2012 12:00AM by Vikash Kumar Singh   

This post is next in series of our exploration of Google Data API library. We have learnt what Google Data API is and what is needed to get started with it in first part. In second part we learn how to read Album titles from Picasa Web with Google Data API. In third part of the series we learn to read interesting attributes of Albums such as number of photo stored in each web album, author of the each of the album and data size of each album. In fourth part we learnt how to create a new Picasa web album through Google Data API.

In this post we will use Googe Data API i.e. GData to upload an image to our newly created web album thorugh our .NET client interface

To upload an Image to Picasa web album, we need Album ID. To get the album ID of our newly created web album, all we need is to go to our Picasa web account and open the newly created Album. Remember we created a new Album “Google is the Best” in our last post. I open the web Album. Since it has no images so the album was blank. The status bar of the chrome browser shows absolute path of the web album URL when you hover your mouse over RSS link. The path is in form https://picasaweb.google.com/data/feed/base/user//albumid//XXX

The albumid part of the URL is followed by album ID of the web album we are exploring.

In our .NET interface, I have added a new button “Upload Image”. After clicking on this button, the images will be uploaded to our Picasa web album.

I have following image in my C:\Temp folder which I will be uploading to “Google is the Best” Picasa web album, which we created in our last post.

The .NET code snippet on this button is following. Please remember the code is purely for demonstration purpose; the error handling or coding best practises are not shown here.

private void button4_Click(object sender, EventArgs e)
{
PicasaService myPicasa = new PicasaService("Vikash-Test-Picasa");
//Passing GMail credentials(EmailID and Password)
myPicasa.setUserCredentials("abc@gmail.com", "abc");

//User ID and AlbumID has been used to create new URL
Uri newURI=new Uri(PicasaQuery.CreatePicasaUri("abc","5737335314773942337"));

//Image path which we are uploading
System.IO.FileInfo newFile=new System.IO.FileInfo("C:\\006. Temp\\PicasaTest.jpg");
System.IO.FileStream neFStream=newFile.OpenRead();
PicasaEntry newEntry=(PicasaEntry) myPicasa.Insert(newURI,neFStream,"Image/jpeg","Test");
neFStream.Close();
System.Windows.Forms.MessageBox.Show("Image has been uploaded");
}

After running the form I clicked on upload image button and the code run successfully and shows message "Image has been uploaded”"

The next thing I did was click on button “Get Picasa Web Album Name” button and it fetches all the album name, number of images in each web album etc. The newly created web album “Google is the Best” is now showing one image into it.

I log into my Picasa web account and sure enough the image was right up there.

With this we have completed our objective to upload an image to Picasa web album through our .NET client interface.

Thanks for reading till this point.


Republished from Blog by Vikash Kumar Singh [46 clicks].  Read the original version here [1 clicks].

Vikash Kumar Singh
280 · 0% · 152
1
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

"How to upload image in Picasa Web Album with Google Data API?" rated 5 out of 5 by 1 readers
How to upload image in Picasa Web Album with Google Data API? , 5.0 out of 5 based on 1 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]