Skip Menu |
 

This queue is for tickets about the Imager CPAN distribution.

Report information
The Basics
Id: 60637
Status: resolved
Priority: 0/
Queue: Imager

People
Owner: Nobody in particular
Requestors: mgrimes [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.77
Fixed in: (no value)



Subject: Exif data not written for jpegs
Download (untitled) / with headers
text/plain 497b
Writing exif data for a jpeg does not seem to work. In memory, you can settag/addtag and then the appropriate value will be displayed by tags(), but if you write the file the tag seems to get lost. I have tried this on OS/X and Archlinux with the same results. The attached test file fails the second test. On my linux box I have: Imager 0.77 perl 5.12.1 libjpeg 8.0.2 BTW, thanks to all involved in writing/maintaining this module. It is by far my favorite perl image module. -Mark
Subject: im-tag.pl
Download im-tag.pl
text/x-perl 533b
#!/usr/bin/env perl use strict; use warnings; use Test::More; use Imager; my $img = Imager->new; $img->read( file => 'test.jpg' ) or die; my $tag_value = 'Test Value'; $img->settag( name => 'exif_model', value => $tag_value ) or die; is( $img->tags( name=>'exif_model'), $tag_value, 'exif data in memory' ); my $jpg; $img->write( data => \$jpg, type => 'jpeg' ) or die $img->errstr; my $im2 = Imager->new; $im2->read( data => $jpg ) or die $im2->errstr; is( $im2->tags( name=>'exif_model'), $tag_value, '... read after write' );
Download (untitled) / with headers
text/plain 681b
On Mon Aug 23 10:14:38 2010, MGRIMES wrote: Show quoted text
> Writing exif data for a jpeg does not seem to work. In memory, you can > settag/addtag and > then the appropriate value will be displayed by tags(), but if you > write the file the tag seems > to get lost. > > I have tried this on OS/X and Archlinux with the same results. The > attached test file fails the > second test.
The documentation may be a bit confusing, Imager doesn't support and has never supported writing EXIF tags to images. Imager only sets the tags in the image object you receive when you read an JPEG image containing EXIF data. If you want to update EXIF data for an image, I'd consider Image::ExifTool. Tony
Subject: Re: [rt.cpan.org #60637] Exif data not written for jpegs
Date: Mon, 23 Aug 2010 11:00:31 -0400
To: bug-Imager [...] rt.cpan.org
From: Mark Grimes <mgrimes [...] cpan.org>
Download (untitled) / with headers
text/plain 504b
On Mon, Aug 23, 2010 at 10:39 AM, TONYC via RT <bug-Imager@rt.cpan.org> wrote: Show quoted text
> The documentation may be a bit confusing, Imager doesn't support and has > never supported writing EXIF tags to images. > > Imager only sets the tags in the image object you receive when you read > an JPEG image containing EXIF data. > > If you want to update EXIF data for an image, I'd consider Image::ExifTool. > > Tony
Ah. That makes sense. The attached patch would add that explanation to the documentation. Thanks.
Download patch
application/octet-stream 446b

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 649b
On Mon Aug 23 11:00:59 2010, MGRIMES wrote: Show quoted text
> On Mon, Aug 23, 2010 at 10:39 AM, TONYC via RT <bug- > Imager@rt.cpan.org> wrote:
> > The documentation may be a bit confusing, Imager doesn't support and
> has
> > never supported writing EXIF tags to images. > > > > Imager only sets the tags in the image object you receive when you
> read
> > an JPEG image containing EXIF data. > > > > If you want to update EXIF data for an image, I'd consider
> Image::ExifTool.
> > > > Tony
> > Ah. That makes sense. The attached patch would add that explanation to > the documentation. > > Thanks.
This is fixed in Imager 0.78, thanks for your report. Tony


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.