php-imagine / Imagine

PHP Object Oriented image manipulation library
https://imagine.readthedocs.io
Other
4.42k stars 529 forks source link

Image creation issue, PHP7 #550

Open fbxcelsior opened 7 years ago

fbxcelsior commented 7 years ago

Hi,

I am using imagine in conjunction with sonata media bundle to create custom actions for my uploaded images. Since moving to PHP7 I get a weird effect on one of my custom actions that was previously work correctly.

When creating a new image, on top of which I will be pasting another image, it seems that the background color that I set is always ignored and I get the following outcome instead of the background color being correctly displayed under the pasted image:

thumb_2821_content_image_default

Did anybody encounter this before? This happens to me with v0.6.3.

Thank you in advance,

Filipe

fbxcelsior commented 7 years ago

It seems to be related to GD. Working fine with ImageMagick. Will leave it open in case somebody would like to take a look at it.

Thanks

bpicolo commented 7 years ago

Fwiw, the gmagick extension seems to have a number of problems against php 7.0.x. (Every version available segfaults on process teardown)

mlocati commented 6 years ago

In order to inspect this issue, we'd need the PHP version, as well as the PHP code. Without these details this issue can't be inspected further (so it can be closed).

picks44 commented 5 years ago

Hi, I got the exact same issue on PHP 7.2. How did you manage to get this sorted @fbxcelsior ? I have both gd2 (2.2.5) and imagick (3.4.3, with ImageMagick 6.9.7) extension installed and enabled on our server. I'm using LiipImagineBundle for Symfony and I get this issue when creating a background "around" my source image. I don't have the issue on my local dev (Windows), only on my pro and test servers (Debian). And we did not have this issue on Debian while using PHP5.6. Any help/clue here?

Danack commented 3 years ago

If anyone is still having this issue, the way to investigate it would be to run the PHP script through valgrind, i.e. something like valgrind php debug.php.

This type of graphical glitch is almost certainly reading from unitialized memory, which valgrind detects and gives out errors for. Then it wil probably need reporting upstream in the PHP bug tracker.