From PHP 8.0 and forward, GD extension uses \GdImage class objects instead of resources.
this means that all the is_resources checks
if (!is_resource($image))
should be expanded with the new
if (!is_resource($image) && !($image instanceof \GdImage))
Otherwise the PngWriter class just doesn't work (saying there's a problem with GD!)
I didn't pull-request because I can't try with previous versions of php (<8.0) and I don't know if the GdImage class needs a polyfill (it probably does, I guess).
From PHP 8.0 and forward, GD extension uses \GdImage class objects instead of resources.
this means that all the is_resources checks if (!is_resource($image)) should be expanded with the new if (!is_resource($image) && !($image instanceof \GdImage))
Otherwise the PngWriter class just doesn't work (saying there's a problem with GD!)
I didn't pull-request because I can't try with previous versions of php (<8.0) and I don't know if the GdImage class needs a polyfill (it probably does, I guess).