I'm working on a program that calls exiftool, a command-line script, to
pull metadata from image files. I'm using SBCL 0.9.15 installed via Fink
on OS X and running Emacs in Apple's X11 environment.
The metadata text contains extended characters that I believe are UTF-8;
I launch my xterms with -en utf-8 and everything displays fine when I
run exiftool from the command line. The code calling exiftool looks like:
(let ((output (with-output-to-string (stream
(sb-ext:run-program "exiftool"
(list filename)
:output stream)))
Unfortunately, the text I get back in output looks nothing like what I'd
expect when printed to the screen. I've tried specifying an
:external-format with format and using various combinations of
sb-ext:octets-to-string and sb-ext:string-to-octets on output. I also
tried a different settings of :element-type for with-output-to-string.
Any suggestions would be much appreciated.
Cheers,
Andreas
Andreas Yankopolus <·······@xxx.yank.to> writes:
> I'm working on a program that calls exiftool, a command-line script,
> to pull metadata from image files. I'm using SBCL 0.9.15 installed via
If you don't rely on specific features of exiftool, you may access
EXIF data from Lisp:
ZPB-EXIF - access to digital image Exif data for Common Lisp
http://www.xach.com/lisp/zpb-exif/
Paolo
--
Why Lisp? http://wiki.alu.org/RtL%20Highlight%20Film
The Common Lisp Directory: http://www.cl-user.net
Paolo,
> If you don't rely on specific features of exiftool, you may access
> EXIF data from Lisp:
>
> ZPB-EXIF - access to digital image Exif data for Common Lisp
> http://www.xach.com/lisp/zpb-exif/
Thanks for the suggestion. I'm grabbing the XMP information from the
image file, which includes IPTC-specified fields for an image
description and the like. The EXIF data gets included as a subset of this.
Cheers,
Andreas
Andreas Yankopolus <·······@xxx.yank.to> writes:
> Paolo,
>
> > If you don't rely on specific features of exiftool, you may access
> > EXIF data from Lisp:
> > ZPB-EXIF - access to digital image Exif data for Common Lisp
> > http://www.xach.com/lisp/zpb-exif/
>
> Thanks for the suggestion. I'm grabbing the XMP information from the
> image file, which includes IPTC-specified fields for an image
> description and the like. The EXIF data gets included as a subset of
> this.
What, specifically? I'd be interested in extending zpb-exif to handle
it.
Zach
Zach,
> What, specifically? I'd be interested in extending zpb-exif to handle
> it.
I use the IPTC core schema for XMP (http://www.iptc.org/IPTC4XMP/) to
enter a description, headline, subject codes, location, contact info,
and a few other things. I'm currently only grabbing the description and
headline to create the web pages, but have a few plans regarding use of
the other fields to create galleries associated with locations,
keywords, etc. I'm also using the camera make, model, and lens in
creating the pages.
Are you familiar with XMP and/or IPTC? XMP is an XML-based system. I'd
be happy to send you sample images.
Cheers,
Andreas
Andreas Yankopolus wrote:
> I'm working on a program that calls exiftool, a command-line script, to
> pull metadata from image files. I'm using SBCL 0.9.15 installed via Fink
> on OS X and running Emacs in Apple's X11 environment.
I've also tried Carbon Emacs (v 22.0.50.1) and the Fink version of Emacs
(v 21.2.1) in a terminal window. Both produce the same character errors
that I see in X11. The output when I run exiftool from the command
line is correct in both a terminal window and an xterm.
Cheers,
Andreas