I have been using the Picasa Data API to download images into a photo
gallery in Google Pages. Width and height are used to orientate the
photos. However, for some albums these seem to be the wrong way round,
and I have to modify the javascript accordingly.
I have been using ...
var height = item.gphoto$height.$t;
var width = item.gphoto$width.$t;
var orientation =(height>width ? "vert" : "hor");
However for some albums I have to write ...
var orientation =(height<width ? "vert" : "hor");
...to get the correct orientation of the photos!
Why?
(The "vert" and "hor" are used as classes for the CSS image display.)
example at http://philandjude.googlepages.com/scrollingphotogallery
and confused output at http://philandjude.googlepages.com/scrollingphotogallery2
where >needs to be reversed to < .