Sat Jan 28 14:44:59 2017schwiege [...] gmx.net - Ticket created
Subject:
rounding error in resize
Date:
Sat, 28 Jan 2017 19:44:36 +0000
To:
bug-Image-Resize [...] rt.cpan.org
From:
Mischa <schwiege [...] gmx.net>
The constraint height and width is calculated without properly rounding
the numbers.
That can lead to unexpected results, e.g. requesting 128 but getting 127.
The error seems to be in line 47 / 48
$height = int($self->height * $k);
$width = int($self->width * $k);
which should be imo
$height = int( $self->height * $k + .5 );
$width = int( $self->width * $k + .5 );