I did:

JpegBitmapEncoder encoder = new JpegBitmapEncoder();
            encoder.Frames.Add(BitmapFrame.Create(targetBitmap));
            using (var ms = new MemoryStream())
            {
                encoder.Save(ms)
PicasaService service = new PicasaService("exampleCo-exampleApp-1");
                service.setUserCredentials("login", "password");
                

                AlbumQuery query = new 
AlbumQuery(PicasaQuery.CreatePicasaUri(service.Credentials.Username));
                PicasaFeed feed = service.Query(query);
                bool isAlbum = feed.Entries.Any(p => p.Title.Text == 
"MyAlbum");
                var album= feed.Entries.Where(p => p.Title.Text == 
"MyAlbum").ToList();
                
                if (!isAlbum)
                {
                    AlbumEntry newEntry = new AlbumEntry();
                    newEntry.Title.Text = "MyAlbum";
                    newEntry.Summary.Text = "This is an album";
                    AlbumAccessor ac = new AlbumAccessor(newEntry);
                    //set to "private" for a private album
                    ac.Access = "public";

                    Uri feedUri = new 
Uri(PicasaQuery.CreatePicasaUri(service.Credentials.Username));

                    PicasaEntry createdEntry = 
(PicasaEntry)service.Insert(feedUri, newEntry);
                }
                Album alb = new Album();
                alb.AtomEntry = album.First(); 

                Uri postUri = new 
Uri(PicasaQuery.CreatePicasaUri(service.Credentials.Username, alb.Id));

                
                PicasaEntry entry = (PicasaEntry)service.Insert(postUri, 
ms, "image/jpeg", "my file");
}

This string return error 
PicasaEntry entry = (PicasaEntry)service.Insert(postUri, ms, "image/jpeg", 
"my file");

What am I doing wrong?



<http://clip2net.com/clip/m116377/1362592993-clip-37kb.png><http://clip2net.com/clip/m116377/1362592908-clip-19kb.png>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-picasa-data-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to