Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: keng [...] apple.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.153
Fixed in: 0.155



Subject: Found/Fixed an issue with Image::MetaData::JPEG
Date: Sun, 29 Jul 2012 19:17:35 -0700
To: bug-Image-MetaData-JPEG [...] rt.cpan.org
From: Ken Greenebaum <keng [...] apple.com>
I am running Perl v5.12.4 on a Mac running OS X 10.8 and encountered an issue with Image::MetaData::JPEG where even in the most simple re-write case a spurious 0x20 is inserted after every marker written causing the resulting jpeg file to be corrupt. The issue might not be in the library, but in my perl program hosting the library however the library should ideally be robust to this. Simple example: my $image = new Image::MetaData::JPEG('source.jpg', $parseSegments); $image->save('rewrite.jpg'); I found that replacing the comma enumeration with a period concatenation in the return from the module's Segment.pm:output_segment_data() fixed the issue for me: return print {$out} $preamble.$this->data(0, $length); I hope this can help someone else. -Ken
Hi, thank you for your remark and excuse me for the long delay. I suspect the problem is due to an interaction between your perl program and my library. You (or your default setup) have probably set the "output field separator" variable (that is $, ) to a space instead of leaving it undef as usual. Collapsing the elements of the list toghether with the dot operator of course circumvents the problem, since list items are joined before they are output, thus making the output field separator irrelevant. Show quoted text
>> however the library should ideally be robust to this.
OK, I will adopt this suggestion in the next bug fix release. Thank you again, regards, S. Bettelli
Thanks, fixed in 0.155 -- rjbs