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

Watermark-Filter does not support transparency? #808

Open
Stuffy opened this issue Sep 30, 2016 · 5 comments
Open

Watermark-Filter does not support transparency? #808

Stuffy opened this issue Sep 30, 2016 · 5 comments
Labels
Type: Support This item pertains to support for this project.

Comments

@Stuffy
Copy link

Stuffy commented Sep 30, 2016

When using the watermark-filter, the watermark appears with a black background on the filtered image.
These are the filter settings im using:

liip_imagine:
    driver: gd
    resolvers:
       default:
          web_path: 
            web_root: ~

    loaders:
        default:
            filesystem:
                data_root: ~

    filter_sets:
        watermark_image:
            filters:
                watermark:
                    image: ../data/watermark_safe.png
                    # size of the water mark relative to the input image
                    size: 1
                    # set the position of the watermark
                    position: center

Am I doing something wrong?

@jehaby
Copy link
Contributor

jehaby commented Sep 30, 2016

I think I had the same problem with "GD" and pngs. Solved by switching to driver: imagick :)

@robfrawley
Copy link
Collaborator

@Stuffy Did the suggestion by @jehaby resolve your problem? (If so, we should open an issue specifically about GD and transparency problems).

@Stuffy
Copy link
Author

Stuffy commented Oct 4, 2016

Unfortunately, we do not have the imagick-php lib available on our webserver.
I did some reading on GD and the transparency problem, and GD has indeed some issues with transparencies. But there seem to be fixes or workarounds as described here: http://stackoverflow.com/questions/11680734/php-watermark-png-transparency-alpha . It is to note that I tried a 8-Bit png and a 24-bit png, and both did not work.

@alexwilson alexwilson added the Type: Support This item pertains to support for this project. label Oct 24, 2016
@peter-gribanov
Copy link
Contributor

Is there a solution without going to a Imagick?
I ran into a similar problem.

Origin image

Origin image

After resize

After resize

@franmomu
Copy link
Contributor

I've been trying to replicate this here: https://github.com/franmomu/liip-imagine-bundle-examples, with this configuration it works. But I don't know if it's the same thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Support This item pertains to support for this project.
Projects
None yet
Development

No branches or pull requests

6 participants