Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

report Splitter::coalesceToResources bug #5

Open
xiaozi opened this issue Sep 9, 2021 · 0 comments
Open

report Splitter::coalesceToResources bug #5

xiaozi opened this issue Sep 9, 2021 · 0 comments

Comments

@xiaozi
Copy link

xiaozi commented Sep 9, 2021

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;
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants