Open Madpeterz opened 2 years ago
Thanks for reporting this. I'm not sure there's anything to do here, as runtime type checking isn't something I want to add to every method. I agree that it would be more graceful to catch these instead of seeing warnings.
What do you propose?
maybe just 1 check on the result imagecreatetruecolor if that's not a valid resource throw an error.
Versions: PHP 7.4.27 (cli) claviska/simpleimage ^3.6
if you pass invalid values to the resize function it does not throw an error and ends up creating bad images
Warnings
[Broken] Code (You should use the change as a percentage so you dot get zero or negative heights :P )