Open wanmad opened 3 years ago
Hey, the neccessary change was already implemented and suggested as a pull reuqest (https://github.com/Oberto/php-image-magician/pull/22). If you take this version, it should work:
Search for all calls of is_resource()
and change them to
is_resource($this->imageResized) || $this->imageResized instanceof \GdImage
and it should work fine again.
using php 7.4, code is ok but not ok on php 8.0
$final_image = rand(1000,1000000).$img; $path = "assets/image/staff/".strtolower($final_image); $magicianObj = new imageLib($path); $magicianObj -> resizeImage(64, 64, 'crop'); $newPath = "assets/image/staf/".$id.".jpg"; $magicianObj -> saveImage($newPath,100);
error saveImage: This is not a resource..