Skip Menu |

This queue is for tickets about the Image-MetaData-JPEG CPAN distribution.

Report information
The Basics
Id: 13531
Status: resolved
Priority: 0/
Queue: Image-MetaData-JPEG

People
Owner: Nobody in particular
Requestors: otuyama [...] yahoo.com.br
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.141
Fixed in: 0.15



Subject: EXIF file not found (retrieve_app1_Exif_segment.pm)
Hi, I think the file 'retrieve_app1_Exif_segment.pm' is not included in the distribution. I got this error: Can't locate Image/MetaData/JPEG/retrieve_app1_Exif_segment.pm in @INC (@INC contains: D:/Perl/lib D:/Perl/site/lib .) a t ..\site.pl line 2. BEGIN failed--compilation aborted at ..\site.pl line 2. Thanks. Julio Otuyama
Subject: retrieve_app1_Exif_segment is not a module
Dear Julio Otuyama, thank you for your interest in the Image-MetaData-JPEG package, and for taking time to report a misfunctioning. You suggested there might be a missing file in the distribution, but there is no retrieve_app1_Exif_segment module in my package. Indeed, this is the name of a method in the Image::MetaData::JPEG class, the first one in the lib/Image/MetaData/JPEG/JPEG_app1_exif.pl file. I suspect you are using a statement like: use Image::MetaData::JPEG::retrieve_app1_Exif_segment; while the correct statement should be use Image::MetaData::JPEG; (the method is automatically exported). Could you send me the relevant parts of the script you are trying to code, to be sure about the problem? Best regards, Stefano Bettelli
Subject: Image::MetaData::JPEG ticket #13531: final comments
Dear Julio Otuyama, I am glad your script is working right now. I will try to incorporate some documentation changes in next release, as you suggest. Just some final comments. Show quoted text
> ... I couldn't find documentation about what > segment I should use. I am using the first > (there is only one). > > use Image::MetaData::JPEG; > my $image = new Image::MetaData::JPEG('image.jpg'); > my $segment = $image->retrieve_app1_Exif_segment(0); # why the first? > my $image_data = $segment->get_Exif_data('IMAGE_DATA', 'TEXTUAL'); > print $image_data->{DateTimeOriginal}->[0];
The "retrieve_app1_Exif_Segment" method returns a reference to the first Exif Segment in the picture file, if its index is undefined. So, you could as well write $image->retrieve_app1_Exif_segment(). Indeed, well formed Exif files have only one APP1 Exif segment, so this is a safe choice; I included the possibility to use an index just for exploring non-standard files, but this is an "expert" option. You can safely use retrieve_app1_Exif_segment(), i.e., without arguments. Best regards, Stefano Bettelli