Hi all:
I have been working to extract the exif information from jpegs using
RMagick and the get_exif_by_entry function. However, no matter what I
try it returns an empty array. I am certain the file has exif info as I
save it from Photoshop with the embed XMP option selected.
A simply test such as:
photo = Magick::Image.read(path_to_file).first
photo.get_exif_by_entry
returns [] always
Am I missing something?
I have RMagick 2.0 installed.
Thanks,
John
···
--
Posted via http://www.ruby-forum.com/.
Quoting John Smith (john.smith@sherwoodmechanical.com):
I have been working to extract the exif information from jpegs using
RMagick and the get_exif_by_entry function. However, no matter what I
try it returns an empty array. I am certain the file has exif info as I
save it from Photoshop with the embed XMP option selected.
A simply test such as:
photo = Magick::Image.read(path_to_file).first
photo.get_exif_by_entry
returns always
Here I receive a populated hash. You say you are sure that the tags
are present, but did you check this with a standalone tool
(e.g. exiftags here on linux)?
Carlo
···
Subject: RMagick Exif
Date: Wed 02 Jan 08 04:40:33PM +0900
--
* Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - fluido@fluido.as che bisogno ci sarebbe
* di parlare tanto di amore e di rettitudine? (Chuang-Tzu)
John Smith wrote:
Hi all:
I have been working to extract the exif information from jpegs using
RMagick and the get_exif_by_entry function. However, no matter what I
try it returns an empty array. I am certain the file has exif info as I
save it from Photoshop with the embed XMP option selected.
A simply test such as:
photo = Magick::Image.read(path_to_file).first
photo.get_exif_by_entry
returns always
Am I missing something?
I have RMagick 2.0 installed.
Thanks,
John
Open a bug track on RubyForge and upload the image you're trying to use. Also add which version of ImageMagick you're using.
···
--
RMagick: http://rmagick.rubyforge.org/
RMagick 2: http://rmagick.rubyforge.org/rmagick2.html
In article <3ed10879dcc030dbf9b38fb1b5575955@ruby-forum.com>,
···
John Smith <john.smith@sherwoodmechanical.com> wrote:
I have been working to extract the exif information from jpegs using
RMagick and the get_exif_by_entry function. However, no matter what I
try it returns an empty array. I am certain the file has exif info as I
save it from Photoshop with the embed XMP option selected.
The way I deal with these is by using exiftool with the mini_exiftool Ruby module. It has been working great so far.
-----
require "rubygems"
require "mini_exiftool"
[...]
def set_lens_info(data)
lens_type = data.lens_type
#
# Check for M-42 lens
#
if lens_type.nil? or lens_type =~ /M-42|K,M/ then
[...]
data.lens_type = lens_type
data.save
end # -- set_lens_info
[...]
def main(argv)
argv.each do |fn|
data = MiniExiftool.new(fn)
ts = data.date_time_original
save_ok = set_lens_info(data)
if save_ok then
File.utime(Time.now, ts, fn)
STDERR.puts("#{fn} saved ok, time changed")
STDERR.puts(" #{data.lens}")
else
STDERR.puts("Error saving #{fn}")
data.errors.each do |fld, msg|
STDERR.puts(" #{fld}: #{msg}")
end
end
end
return 0
end # -- main
--
Ollivier ROBERT -=- EEC/RIF/SEU -=-
Systems Engineering Unit
Carlo E. Prelz wrote:
Subject: RMagick Exif
Date: Wed 02 Jan 08 04:40:33PM +0900
Quoting John Smith (john.smith@sherwoodmechanical.com):
returns always
Here I receive a populated hash. You say you are sure that the tags
are present, but did you check this with a standalone tool
(e.g. exiftags here on linux)?
Carlo
Yes, I have made sure that the exif information is there by loading the
file into Lightroom and it is able to list all the exif data.
···
--
Posted via http://www.ruby-forum.com/\.
Tim Hunter wrote:
John Smith wrote:
John
Open a bug track on RubyForge and upload the image you're trying to use.
Also add which version of ImageMagick you're using.
ImageMagick version 6.3.5.
···
--
Posted via http://www.ruby-forum.com/\.
Quoting John Smith (john.smith@sherwoodmechanical.com):
Yes, I have made sure that the exif information is there by loading the
file into Lightroom and it is able to list all the exif data.
The best thing you can do is open a ticket on rubyforge, attaching a
copy of the image, as the author of rmagick suggested. First register
at
http://rubyforge.org/account/register.php
and then login and submit your ticket at
http://rubyforge.org/tracker/?func=add&group_id=12&atid=133
Carlo
···
Subject: Re: RMagick Exif
Date: gio 03 gen 08 04:30:44 +0900
--
* Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - fluido@fluido.as che bisogno ci sarebbe
* di parlare tanto di amore e di rettitudine? (Chuang-Tzu)