Skip to content

report Splitter::coalesceToResources bug #5

@xiaozi

Description

@xiaozi

Splitter::coalesceToResources this function copy a frame to the base frame, but not the base frame variable not be used.

$resources[$key] = $resource;

I fix this:

$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;
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions