Skip to content

Add Banner return unknown characters #173

Open
@tommyhartono

Description

@tommyhartono

Hello, I tried to use add banner feature in my image (my purpose is to add logo stamp to my image)

Main Image I use https://app.mulai.com/pub/2021/7/20/3d3d514f2021-07-20-14-36-44x.png
The banner image is https://app.mulai.com/images/splash/favicon-16x16.png

I use this code

$image = new ImageResize('pub/2021/7/20/3d3d514f2021-07-20-14-36-44x.png');

// Add banner on bottom left corner
$image18Plus = 'images/splash/favicon-16x16.png';
$image->addFilter(function ($imageDesc) use ($image18Plus) {
    $logo = imagecreatefrompng($image18Plus);
    $logo_width = imagesx($logo);
    $logo_height = imagesy($logo);
    $image_width = imagesx($imageDesc);
    $image_height = imagesy($imageDesc);
    $image_x = $image_width - $logo_width - 10;
    $image_y = $image_height - $logo_height - 10;
    imagecopy($imageDesc, $logo, $image_x, $image_y, 0, 0, $logo_width, $logo_height);
});

to output I put something like this

But it shown an unknown list of character, you can check it at https://app.mulai.com/test.html

Am I doing anything wrong there?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions