[Originally posted by exiftool on 2008-09-24 11:10:54-07]The previews aren't base64 -- they are straight binary. The
only base64-encoded image is the XMP thumbnail, but this
isn't very common. The PreviewImage voodoo is manufacturer
specific in most cases since the pointer is located in the
proprietary makernote data, and ExifTool will only append a
PreviewImage trailer if it is supported by the embedded
makernotes.
There are other techniques for adding a large preview to
a JPEG: 1) The AFCP trailer preview, which is an open standard
but not very common, and 2) the MIE trailer, which is exiftool
specific. Note that basically nothing except exiftool will be able
to read a preview image in these formats, and most image
editors will destroy such a preview when they rewrite the image.
Also, ExifTool will not add these types of trailers, but it is easy
to add them yourself once you have created them. Below
is an example of how to add a large preview image in a MIE
trailer:
exiftool trailer.mie "-previewimage<=preview.jpg" -trailersignature=1
type trailer.mie >> image.jpg
The first command above creates a MIE file containing the large
preview, and adds a trailer signature so the MIE file can be used
as a JPEG trailer. The second command adds the MIE trailer to
a JPEG image (with any luck -- I'm not a Windows expert, but I
think the "type" command may do this. In Unix, the "cat"
command is used).
I hope this helps.
- Phil