Picasa face tags and .picasa.ini: where your names, stars and albums are, and how to move them into the photos
You named hundreds of faces in Picasa, starred your best photos and sorted them into albums. Then you opened the same folders in another program and none of it was there. Nothing was deleted. Picasa kept that work next to your photos, in a format only Picasa reads.
What Picasa keeps in .picasa.ini
Every folder Picasa worked on has a hidden text file named .picasa.ini. It has one section per photo, named after the file, with a line for each thing Picasa remembered about it. The lines below follow real folders written by Picasa 3.9, with the names changed:
[DSC_5636.JPG]
faces=rect64(cb170000fa065125),6bc93d5be111a4a8;rect64(228f4e923b187aaf),915d2fa8f7cdeae6
backuphash=14043
[photo05.jpg]
albums=0925e37243e77ab02c6835534d79ce09
star=yes
[photo04.jpg]
filters=enhance=1;
[.album:0925e37243e77ab02c6835534d79ce09]
name=Summer 2011
token=0925e37243e77ab02c6835534d79ce09
date=2015-03-15T14:00:00-07:00
[Contacts2]
6bc93d5be111a4a8=Maya Ortiz;;
915d2fa8f7cdeae6=Sam Lee;sam@example.com;faces=One entry per face, separated by semicolons: a rectangle asrect64(…)and the id of the person. The idffffffffffffffffmeans Picasa found a face and nobody named it.star=yesThe photo is starred.albums=The ids of the albums the photo is in, separated by commas. Each album has a[.album:id]section with its name. That section can be in the.picasa.iniof a different folder, so all of them have to be read together.[Contacts2]The names of the people tagged in that folder:id=Name;email;.filters=,crop=,rotate=,text=Edits you made and did not save to the file. Picasa applied them every time it showed the photo.backuphash=,moddate=Picasa’s own bookkeeping.
Captions and the tags with the yellow icon are a different case. For a JPEG, Picasa 3.9 wrote them into the file as soon as you typed them, as IPTC and XMP, and other programs already read them. In files written by Picasa that we examined, the caption and the tag were in the JPEG and not in .picasa.ini.
Why other programs don’t see it
Photo programs look for metadata in two places: inside the image file (EXIF, IPTC, XMP) and in an .xmp sidecar file next to it. A line in .picasa.ini is in neither. Unless a program has code written specifically for Picasa’s file, your faces, stars and albums do not exist for it. Some organizers do read .picasa.ini, but they import it into their own library, so the data still does not live in your photos.
What XMP and MWG regions are
XMP is the metadata standard Adobe published and most photo software adopted. It is a block of text inside the file (or in a sidecar) with named fields. The ones that matter here:
mwg-rs:RegionsThe face region schema of the Metadata Working Group. Each region has a name, a type (Face) and an area: the center, width and height of a rectangle, as fractions of the picture. This is the schema Picasa itself used when asked to write faces into files.xmp:RatingA rating from 0 to 5.dc:subjectThe list of keywords.lr:hierarchicalSubjectKeywords with their place in a tree, levels separated by|, such asAlbums|Summer 2011.
How rect64 becomes a face region
rect64(cb170000fa065125) is one 64-bit number written in hexadecimal. Cut it into four groups of four digits and you get the left, top, right and bottom edges of the face: cb17, 0000, fa06, 5125. Each is a number from 0 to 65535 that stands for a position between 0 and 1 across the width or height of the picture. Left is 0xcb17 / 65535 = 0.793, top is 0, right is 0.977, bottom is 0.317.
Two details trip up scripts. Picasa drops leading zeros, so a real file has rect64(dddfffff222), which has to be padded on the left to 16 digits before cutting. And an MWG area is not left/top/right/bottom: it is the center point plus width and height. For the example above: x 0.885, y 0.158, w 0.183, h 0.317.
The rectangle is relative to the picture as its pixels are stored in the file. MWG regions are defined the same way, and a program that shows the photo turned according to its EXIF orientation flag turns the regions with it. So for a JPEG no rotation is applied when converting. RAW files are the exception that ExifTool’s Picasa configuration documents: for NEF and CR2 shots marked as rotated, Picasa stored the rectangle as if they were not.
Which programs read the result
What we can vouch for: ExifTool reads back the regions, names, rating and keywords from every file TagEmbed writes; that is part of our tests. Immich documents reading xmp:Rating and lr:hierarchicalSubject from files and sidecars and imports MWG face regions. PhotoPrism documents importing MWG face regions from embedded XMP and from .xmp sidecars. digiKam imports face regions that Picasa wrote in this schema. Keywords and ratings in XMP are read by most photo managers, Lightroom among them.
What to expect less from: Apple Photos and Google Photos group faces on their own, and we have not seen either one use face regions from files. Sidecars also vary: Adobe programs read photo.xmp sidecars for RAW files only, while Immich prefers photo.jpg.xmp. Try a handful of photos in your program first.
Where contacts.xml is
Picasa also kept a list of every person in one file, contacts.xml:
<contacts>
<contact id="6bc93d5be111a4a8" name="Maya Ortiz" modified_time="2014-06-11T20:40:16-07:00" local_contact="1"/>
</contacts>On Windows it is at %LocalAppData%\Google\Picasa2\contacts\contacts.xml (paste that into the File Explorer address bar). A backup made from inside Picasa has it too. You often do not need it: the names are also in the [Contacts2] section of each folder’s .picasa.ini. It matters when a folder’s .picasa.ini has a person id and no name for it.
Ways to write it into the photos
- Picasa itself. If it is still installed, Picasa 3.9 has a command in its Tools menu that writes the face tags of your photos into the files as XMP. It covers faces only and rewrites every file in place.
- ExifTool with
picasa_faces.config. A free configuration file that ships with ExifTool. It reads.picasa.iniandcontacts.xmland writes MWG or Microsoft face regions. Command line; faces only. - embed_picasa_tags. A free PHP script from 2013 that writes faces, captions and keywords from
.picasa.iniinto copies of the files, using exiv2 or ExifTool. - picasa2digikam. A free Python script that moves faces, albums and stars into digiKam’s database, not into the files.
- TagEmbed. This site’s tool: choose the folder in your browser and get copies of the JPEGs with faces, stars and albums as XMP inside, or
.xmpsidecars, plus a report. Free for 25 photos per run, $9 once for all.
What cannot be carried over
- Albums as albums. No standard field means “album”. A keyword such as
Albums|Summer 2011is the portable form. - Unsaved edits. Crops, filters and red-eye fixes that live in
filters=can only be rendered by Picasa. If Picasa still runs, save them there first. - Faces nobody named. They have no name to write.
- Names that are nowhere. A person id without a name in any
.picasa.iniorcontacts.xml.