demosthenes.info

I’m Dudley Storey, the author of Pro CSS3 Animation. This is my blog, where I talk about web design and development with , and . To receive more information, including news, updates, and tips, you should follow me on Twitter or add me on Google+.

web developer guide

my books

Book cover of Pro CSS3 AnimationPro CSS3 Animation, Apress, 2013

my projects

CSSslidy: an auto-generated #RWD image slider. 1.5K of JS, no JQuery. Drop in images, add a line of CSS. Done.

tipster.ioAutomatically provides local tipping customs and percentages for services anywhere.

Edit Image Metadata With PhotoShop

tools / photoshop

Estimated reading time: 2 minutes, 30 seconds

Auto-captioned image with ITPC metadataMost images contain metadata embedded in the bitmap file. In digital cameras and some other media, this data is in EXIF format. (The acronym is a little bit of misnomer: EXIF is also used in some audio formats).

EXIF is intended to be a “write once, read many times” record: only information germane to the original image at the moment it is made, such as time, place, focal length settings and ISO, are meant to be embedded.  Many applications, including , have the ability to read and re-write EXIF, as does . However, there are a few issues with using EXIF as a source of image captioning for web pages:

  1. Different manufacturers record EXIF data inconsistently in digital cameras; there is, as yet, no one standard.

  2. EXIF data is often stripped or modified as an image moves through a workflow (for example, in PhotoShop) or web services: Facebook deletes EXIF information from images, in part to avoid privacy concerns. (Not everyone wants their home to be located from their posted photographs: many cameras, including those in mobile phones, embed the current GPS coordinates in EXIF data.)

  3. It is relatively rare for designers to put raw images with fully preserved EXIF data on web pages.

  4. EXIF data is only supported in JPEG, TIFF, BMP, and a few other formats; embedding in GIF and PNG is not officially supported.

Instead, I’d suggest using IPTC data as a source of captioning information. The format is richer and more diverse than EXIF, while eliminating all the drawbacks above, except for the last: PHP doesn’t support reading IPTC from PNG or GIF files. (In order to do that, I would recommend RDF… but as an XML standard, RDF is somewhat harder to explain and use… so I will leave that for another time.)

PhotoShop CS5 image File Info ScreenFirst, we need to make sure our images are correctly tagged with ITPC data. If our portfolio consists of just a few images (or if you have the ability to add metadata while editing the image) I would recommend using Adobe PhotoShop or Bridge to add the correct information. In PhotoShop, the metadata editor is found under File / File Info…  (For this example, I’ll use a Creative Commons licensed photographs by René González.)

PhotoShop Save For Web with Metadata onAs you can see, there are many options for adding metadata to an image (the adventurous will spot Dublin Core as one possibility). For right now, we’re only interested in the areas most easily accessed by PHP: the ITPC tab, most particularly the slots for creation date, location, and content of the image.

With the data added, save your image as usual, with the alteration that you must turn on the option for metadata: either the All Except Camera Info or All option.

comments powered by Disqus

This site helps millions of visitors while remaining ad-free. For less than the price of a cup of coffee, you can help pay for bandwidth and server costs while encouraging further articles.