Forum: Ruby Using RMagick to extract IPTC data from JPEG file

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Jérémy (Guest)
on 2006-02-21 16:04
(Received via mailing list)
Hi all,

I'm relatively new to Ruby and RMagick. I want to extract IPTC
information from JPEG files. Elements that I've already found are :
>From RMagick, iptc_profile :


This, but it doesn't seem to work for :

Anyone can give me some information ?

Thank you all.
on 2006-02-21 16:13
(Received via mailing list)
Send a JPEG with an IPTC profile in it to rmagick AT rubyforge DOT org
and I'll take a look at it.
Jérémy (Guest)
on 2006-02-21 17:05
(Received via mailing list)
Before sending you an image, I want to try by myself :)

Can you just give me some indications on how-to achieve such a process
in Ruby with RMagick ? (if RMagick implements such features)

What I want is extracting some of these information : caption,
headline, copyright_string, etc.

Thank you,
on 2006-02-21 17:14
(Received via mailing list)
RMagick simply provides an interface to the ImageMagick API. The doc
for the iptc_profile attribute tells you everything I know about it. If
you send me an example image I will try it myself and communicate with
the ImageMagick developers if necessary.
Jérémy (Guest)
on 2006-02-21 17:36
(Received via mailing list)
It's Ok, I've just found it!

RMagick can access IPTC values, via the method

That was too easy! :D

Thank you for your proposale!

Jérémy (Guest)
on 2006-02-21 18:09
(Received via mailing list)
Oups! I was wrong finally. get_exif_by_entry only returns EXIF
information, eheh dumb! :D

So, is there any way with RMagick to extract, keywords, city, province,
country, etc.

J. Friedrich (Guest)
on 2006-02-22 11:07
Jérémy wrote:
> So, is there any way with RMagick to extract, keywords, city, province,
> country, etc.
The iptc_profile attribute of the Image class. (see post of rmagick!)


btw: rmagick AT rubyforge DOT org is the official e-mail address for the
RMagick project. They want to help you.
Jérémy (Guest)
on 2006-02-22 14:39
(Received via mailing list)
I'm currently working on it! Writing a class to format the binary IPTC
string returned by RMagick.
Jérémy (Guest)
on 2006-02-22 20:20
(Received via mailing list)
Ok, I've realesed a first version :

This topic is locked and can not be replied to.