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

Add Banner return unknown characters #173

Open
tommyhartono opened this issue Jul 22, 2021 · 0 comments
Open

Add Banner return unknown characters #173

tommyhartono opened this issue Jul 22, 2021 · 0 comments

Comments

@tommyhartono
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant