Skip Menu |

This queue is for tickets about the Image-Magick-Thumbnail CPAN distribution.

Report information
The Basics
Id: 21332
Status: resolved
Priority: 0/
Queue: Image-Magick-Thumbnail

People
Owner: Nobody in particular
Requestors: mfriebe [...] hybyte.com
Cc:
AdminCc:

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



Subject: wrong resize in some cases
Date: Tue, 05 Sep 2006 16:19:28 +0100
To: bug-Image-Magick-Thumbnail [...] rt.cpan.org
From: Martin Friebe <mfriebe [...] hybyte.com>
the divisor to resize the picture is calculated depending on the original pictures ratio my $r = ($ox>$oy) ? ($ox/$maxx) : ($oy/$maxy); but: if the new size is someting like 100x20 and the orig size is like 1000x300 then 1000 is bigger than 300, so r = 1000/100 = 10 this will lead to the new y size = 300/10 = 30 however the restriction was maxy = 20 -> bug the fix my $r = ($ox/$maxx) > ($oy/$maxy) ? ($ox/$maxx) : ($oy/$maxy); out of the 2 possible divisors, take the bigger one. (pre-calc the values into variables, to avoid double execution of the division.....)
Subject: Re: [rt.cpan.org #21332] wrong resize in some cases
Date: Wed, 06 Sep 2006 13:54:46 +0100
To: bug-Image-Magick-Thumbnail [...] rt.cpan.org
From: Lee Goddard <lee [...] leegoddard.net>
I thought we were doing that...?! Well, thank you for the fix! Will get it in later today/tomorrow. Cheers lee Martin Friebe via RT wrote: Show quoted text
> Tue Sep 05 11:19:49 2006: Request 21332 was acted upon. > Transaction: Ticket created by mfriebe@hybyte.com > Queue: Image-Magick-Thumbnail > Subject: wrong resize in some cases > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: mfriebe@hybyte.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21332 > > > > the divisor to resize the picture is calculated depending on the > original pictures ratio > > my $r = ($ox>$oy) ? ($ox/$maxx) : ($oy/$maxy); > > but: > > if the new size is someting like 100x20 > and the orig size is like 1000x300 > > then 1000 is bigger than 300, so r = 1000/100 = 10 > > this will lead to the new y size = 300/10 = 30 > > however the restriction was maxy = 20 -> bug > > the fix > > my $r = ($ox/$maxx) > ($oy/$maxy) ? ($ox/$maxx) : ($oy/$maxy); > > out of the 2 possible divisors, take the bigger one. > (pre-calc the values into variables, to avoid double execution of the division.....) > > > > > >
-- Lee Goddard Server-side Systems Ltd London N1 :: 0208 369 6832

Message body is not shown because sender requested not to inline it.

In new distro, thanks.