Due to updates, over time, that have been made to the site and the age of this article, this post may not display correctly. In particular images may be missing or product reviews display incorrectly.

If this is the case and you'd particularly like me to fix it, then please reach out to me on Twitter.

Ok, it’s going to get technical.

Although I’ve recently bought Photoshop Elements, Picasa used to be my photo browser of choice (in fact it still is as I get used to Photoshop). Therefore when I wanted an easier way to add photos to the BMTG website, I developed it with Picasa in mind.

Apart from the site generating its own thumbnails, it also gets its description from the embedded Picasa data. I found out the data after reading on the PHP site about looking at EXIF and other image data and writing a program to display it all – this revealed the Picasa caption field.

However, it did seem to have an anomaly in that it ended with a null character. I therefore coded around this. Unfortunately 1 with Picasa 3, this appears to have been fixed and so recently described photos are being truncated on my site. It’s not too much of a hassle, though, to detect for this. The code I use is as follows…

Simply populate $full_filename with, well, the filename of the image. At the end of it all the Picasa caption will be in $description and the image width and height in $width and $height.

The last line of the code is where I’m working around the null character at the end of the caption (or not).

  1. depending how you look at it[]