banister / devil

ruby bindings for devil cross platform image loading library
http://openil.sourceforge.net
Other
60 stars 9 forks source link

Segfaults when rotating by 90 for asymmetrical image sizes #13

Open banister opened 14 years ago

banister commented 14 years ago

Hi!

I grabbed the latest version of your DevIL Ruby binding for win32 the other day. I'm really happy with it, overall (thanks for your work!).

I've run into a small snag which I'm wondering if you know about. I can do a rotate of any image of any arbitrary angle except when the image is non-square AND I ask it to rotate 90 or 270 degrees.

I'm running Ruby 1.9.2 from the official builds.

for example: 240x240 image rotate 45 -> works 240x320 image rotate 45 -> works 240x240 image rotate 90 -> segfault. 240x320 image rotate 90 -> works

banister commented 14 years ago

Bug is in DevIL C library itself. A work around is to use an angle of 90.5 or so rather than 90 exactly.