Skip Menu | will be shut down on March 1st, 2021.

This queue is for tickets about the Imager CPAN distribution.

Maintainer(s)' notes

Tickets for Imager are now on github at

Report information
The Basics
Id: 69261
Status: resolved
Priority: 50/
Queue: Imager

Owner: Nobody in particular
Requestors: TONYC [...]

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

Subject: rotate new size calculation is incorrect, hides interpolation bug
Date: Mon, 4 Jul 2011 15:41:57 +1000
To: bug-Imager [...]
From: tonyc [...]
Download (untitled) / with headers
text/plain 604b
Two bugs in i_rotate_exact_bg(): The code uses: x1 = ceil(abs(src->xsize * rotate[0] + src->ysize * rotate[1])); and similar code to calculate the new limits of the image, but abs() takes and returns an integer, so the size can be up to one pixel too small. The interpolation done then doesn't correctly define the new color, returning (255,33,33) or other non-max saturation reds. This is true even with the intermediate image we produce, which the conversion to paletted doesn't catch due to it's accuracy limits. Replacing the abs() with fabs() fixes the first problem revealing the second.
Fixed in Imager 0.88

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

Please report any issues with to