DevIL icon indicating copy to clipboard operation
DevIL copied to clipboard

Issue in Rotating Non Square Images 90 degrees

Open saneeshkumar opened this issue 9 years ago • 0 comments

I am trying to rotate an image (height greater than width) 90 degree. In the below code it crashes in the function "ILAPI ILimage* ILAPIENTRY iluRotate_(ILimage *Image, ILfloat Angle)".

Consider the image width = 50, and height = 100. So when X=0, Y = 50, RotOffset will be "-1" after executing "RotOffset = x * Rotated->Bps + (Image->Width - 1 - y) * Rotated->Bpp;" Since "RotOffset " is unsigned int, subsequent array access "Rotated->Data[RotOffset + c]" will fail.

saneeshkumar avatar Sep 18 '15 04:09 saneeshkumar