$resources[$key] = $resource;
$coalescedResource = self::cloneResource($base, $baseWidth, $baseHeight);
$resources[$key] = $coalescedResource;
private static function cloneResource($resource, $width, $height)
{
$clonedResource = imagecreate($width, $height);
imagecopy(
$clonedResource,
$resource,
0,
0,
0,
0,
$width,
$height
);
return $clonedResource;
}
Splitter::coalesceToResourcesthis function copy a frame to the base frame, but not the base frame variable not be used.I fix this: