claviska / SimpleImage

A PHP class that makes working with images and GD as simple as possible.
MIT License
1.38k stars 382 forks source link

Implicit conversion from float to int loses precision #317

Closed distantnative closed 1 year ago

distantnative commented 1 year ago

Receiving this error with 4.0.0

Implicit conversion from float 684.8547008547008 to int loses precision

pointing to https://github.com/claviska/SimpleImage/blob/master/src/claviska/SimpleImage.php#L986

My hunch would be that https://github.com/claviska/SimpleImage/blob/master/src/claviska/SimpleImage.php#L975 also should be wrapped in (int) round (), same as already done in https://github.com/claviska/SimpleImage/blob/master/src/claviska/SimpleImage.php#L970

claviska commented 1 year ago

Fixed in #318

distantnative commented 1 year ago

@claviska thank you! unfortunately the 4.0.1 tag seems to not include the fix

claviska commented 1 year ago

Sorry about that. I goofed and created the tag prematurely. 4.0.2 fixes that!