Skip Menu |
 

This queue is for tickets about the Imager CPAN distribution.

Report information
The Basics
Id: 72475
Status: resolved
Priority: 60/
Queue: Imager

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

Bug Information
Severity: Normal
Broken in: 0.86
Fixed in: (no value)



Subject: diagnostic message: "not possible to guess from extension" is not accurate for read() calls
The following diagnostic message is used for both calls to read() and write(): "not possible to guess from extension" However, it is only accurate for read() calls. For calls to read(), extensions are not considered at all, but instead the "magic numbers" in the header are checked. The documentation agrees about this: http://search.cpan.org/~tonyc/Imager- 0.86/lib/Imager/Files.pod#Guessing_types As does the code. For calls to read(), it would be more accurate to say "not possible to guess from the header" or "not possible to guess from the magic number". This may seem like a small thing, but in my case today the accuracy of the diagnostic message was rather important. Before getting to Imager, my input passed through a temp file and lost it's extension. The diagnostic message led me to believe the lack of extension on the incoming temp file may have been the issue, but in fact it was a corrupt image with an invalid "magic number". Thanks again for Imager. We happy to replacing Image::Magick with this.
Download (untitled) / with headers
text/plain 373b
On Wed Nov 16 14:58:10 2011, MARKSTOS wrote: Show quoted text
> The following diagnostic message is used for both calls to read() and > write(): > > "not possible to guess from extension"
Thank you. I've fixed this for the next release of Imager. It turns out read_multi() was checking the extension, so now both check the extension and I've corrected the error message for both. Tony
Download (untitled) / with headers
text/plain 418b
On Wed Nov 16 14:58:10 2011, MARKSTOS wrote: Show quoted text
> The following diagnostic message is used for both calls to read() and > write(): > > "not possible to guess from extension" > > However, it is only accurate for read() calls. For calls to read(), > extensions are not considered at all, but instead the "magic numbers" in > the header are checked.
Thank you. This is fixed in Imager 0.87, released yesterday. 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.