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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Df6668e8707022f98f7160bc652fe078?d=identicon&s=25 Jérémy (Guest)
on 2006-02-21 15: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 :
http://www.simplesystems.org/RMagick/doc/imageattr...

And

This, but it doesn't seem to work for :
http://studio.imagemagick.org/pipermail/magick-use...

Anyone can give me some information ?

Thank you all.
B33ea5c12d767bfd1253940a960274f5?d=identicon&s=25 rmagick@gmail.com (Guest)
on 2006-02-21 15: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.
Df6668e8707022f98f7160bc652fe078?d=identicon&s=25 Jérémy (Guest)
on 2006-02-21 16: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,
Jérémy
B33ea5c12d767bfd1253940a960274f5?d=identicon&s=25 rmagick@gmail.com (Guest)
on 2006-02-21 16: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.
Df6668e8707022f98f7160bc652fe078?d=identicon&s=25 Jérémy (Guest)
on 2006-02-21 16:36
(Received via mailing list)
It's Ok, I've just found it!

RMagick can access IPTC values, via the method
get_exif_by_entry([name]).

That was too easy! :D

Thank you for your proposale!

Jérémy
Df6668e8707022f98f7160bc652fe078?d=identicon&s=25 Jérémy (Guest)
on 2006-02-21 17: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érémy
0bade0a5473229438eaa62947dd68e8f?d=identicon&s=25 J. Friedrich (Guest)
on 2006-02-22 10: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!)

Jan

btw: rmagick AT rubyforge DOT org is the official e-mail address for the
RMagick project. They want to help you.
Df6668e8707022f98f7160bc652fe078?d=identicon&s=25 Jérémy (Guest)
on 2006-02-22 13:39
(Received via mailing list)
I'm currently working on it! Writing a class to format the binary IPTC
string returned by RMagick.
Df6668e8707022f98f7160bc652fe078?d=identicon&s=25 Jérémy (Guest)
on 2006-02-22 19:20
(Received via mailing list)
Ok, I've realesed a first version :
http://www.blogthatweb.com/2006/02/22/ruby-on-rail...

Jérémy
This topic is locked and can not be replied to.