PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • How to proceed?
  • Creating a Picasa album
  • Retrieving and modifying a Picasa album
  • Limitations
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Using the service for managing the Google Picasa photo albums
Overview
Picasa Albums Web is an application for managing the online images and photos proposed by Google.
Examples of processes that can be performed in WLanguage:
  • Retrieving the list of albums as well as their details.
  • Retrieving the list of photos found in an album, the tags of a photo, ...
  • Sending and retrieving photos, ...
  • Retrieving and including photos found in the Google Picasa accounts.
Warning: Before using a feature linked to Google services, we strongly recommend that you check the license for using this service. Some restrictions may apply. The content of licenses may change over time.
PC SOFT is in no case responsible for the way the native access functions are used. Make sure that you comply with the license of service provider.
How to proceed?

Creating a Picasa album

To create a Picasa album:
  1. Create a gglAlbum variable. This variable contains the album characteristics.
  2. For each photo that must be included in the album, use a gglPhoto variable to describe the photo characteristics. You also have the ability to describe the tags and the comments associated with the photo.
  3. Add the photo to the album (each photo is an element of the PhotoData array found in the gglAlbum variable).
  4. Use GglWrite to create the photo album on the Google server.
Example:
MyAlbum is gglAlbum
ATag is gglTag
APhoto is gglPhoto
AComment is gglComment

// Create the album
MyAlbum..Title = "Summer holiday"
MyAlbum..Description = "Summer holiday in Austria"
MyAlbum..Timestamp "UTC date and time"
MyAlbum..CommentingEnabled = True

// Photo 1
APhoto..CommentingEnabled = True
APhoto..FileName = "Test"
APhoto..Image = CompleteDir(fExeDir()) + CST_ImageDir + "US.jpg"
APhoto..Legend = "Tower near the river."

// Add tags
ATag..Text = "tower"
Add(APhoto..Tag, ATag)
ATag..Text = "United States"
Add(APhoto..Tag, ATag)
ATag..Text = "By night"
Add(APhoto..Tag, ATag)

// Add comments
AComment..Text = "Great picture!"
Add(APhoto..Comment, AComment)
AComment..Text = "Touched-up photo"
Add(APhoto..Comment, AComment)
AComment..Text = "How did you do it?"
Add(APhoto..Comment, AComment)

// Add the photo 1 into the album
Add(MyAlbum..PhotoData, APhoto)

// Photo 2
APhoto = new gglPhoto // Used to reinitialize
APhoto.Image = CompleteDir(fExeDir()) + CST_ImageDir + "puzzle.png"
Add(MyAlbum..PhotoData, APhoto)

// Photo 3
APhoto = new gglPhoto
APhoto..CommentingEnabled = False
APhoto..FileName = "Tropical fish"
APhoto..Image = CompleteDir(fExeDir()) + CST_ImageDir + "tropical.jpg"
Add(MyAlbum..PhotoData, APhoto)

// Photo 4
APhoto = new gglPhoto
APhoto..FileName = "Drawing"
dStartDrawing(IMG_Map)
dCircle(20, 20, 50, 50, PastelGreen, LightRed)
APhoto..Image = dSaveImageJPEG(IMG_Map, inMemory)
IMG_Map = ""
Add(MyAlbum..PhotoData, APhoto)

// Create the album
IF not GglWrite(sConnection,MyAlbum) THEN
Error("Error while creating the album: " + ErrorInfo())
END

Retrieving and modifying a Picasa album

To retrieve and modify a Picasa album:
  1. Retrieve the requested Picasa album. You have the ability to use:
    • GglListAlbum to retrieve the list of available albums.
    • GglGetAlbum to retrieve a specific album. Different options allow you to specify the elements that will be retrieved (thumbnails, tags, covers, …). The images of the photos will not be retrieved.
    • GglFillAlbum to retrieve the characteristics of an album (an album listed by GglListAlbum for example). Different options allow you to specify the elements that will be retrieved (thumbnails, tags, covers, …). The images of the photos will not be retrieved.
  2. To retrieve the photos from the album, browse the photos found in the album (..PhotoData property of gglAlbum variable) and use GglFillPhoto. Different options allow you to specify the elements that will be retrieved.
  3. To add a photo into the album:
    • describe the photo via a gglPhoto variable.
    • add the photo to the album (each photo is an element of the PhotoData array found in the gglAlbum variable).
    • use GglWrite on the gglAlbum variable to update the album on the Google server.
  4. To modify a photo in the album:
    • modify the characteristics of the photo in the album (via a gglPhoto variable if necessary).
    • use GglWrite on the gglPhoto variable corresponding to the photo to modify to update the album on the Google server.

Limitations

  • No image in PNG format can be added from a WINDEV Mobile application.
  • The Google Picasa functions use the APIs supplied by Google. Some features may operate on the online service and may be temporarily blocked by Google via the APIs.
Minimum required version
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment