Skip to content

Support cloning of GDImages #15636

Open
Open
@KarelWintersky

Description

@KarelWintersky

Description

I want do something like this:

$f0 = (new Image('test.jpg'))->load()->setQuality(90);

$f1 = $f0->applyFilter(IMG_FILTER_GRAYSCALE)
    ->setFilename('test_grayscale_1.jpg')
    ->save();

$f2 = $f0->applyFilter(IMG_FILTER_NEGATE)
    ->setFilename('test_inverted.jpg')
    ->save();

$f3 = $f0->applyFilter(IMG_FILTER_GRAYSCALE)
    ->setFilename('test_grayscale_2.jpg')
    ->save();

now, test_grayscale2.jpg is inverted AND grayscale, not an only grayscale, as expected.

Is any way to clone GDImage resource without black magic like imgcopy, imgcrop, etc?

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