1

I have a rather unique problem.

We're using EE to apply Watermarks to images on Upload & EE is using GD2 for doing this, which coincidentally is "washing-away" the rich colors of the original uploaded image. What we would like for EE to do is use ImageMagick to apply Watermarks.

We've reported this as a Bug on EE and we've received some thoughts on it:

  1. EE won't be looking into this anytime soon
  2. There's a way to achieve this manually

Specific Question: Has anyone found a solution to this problem? —If not, anyone with a knowledge on how to go about this (especially EE's support suggestion from my discussion with them below).

https://support.ellislab.com/bugs/detail/19036

1

You have three options here:

1) You can hack your core EE files & change the PHP code to use Imagick rather than GD2 when doing watermarks. This may be the quickest code fix, but you'd have to track your changes to those core files whenever you do upgrades or troubleshoot issues.

2) You can write your own, simple plugin that takes an image as a parameter and processes it with Imagick to your satisfaction, returning the new image that you've saved to the filesystem.

3) You can see if CE Image - a fantastic add-on I've relied on in multiple projects - does a better job. It does support adding watermarks.

Updated: I'm guessing you'll start in system/codeigniter/system/libraries/Image_lib.php for #1.

9
  • 1
    CE Image uses GD2, though, not ImageMagick. That being said, Mark is right, it does a very good job at manipulating images. Feb 13 '13 at 13:50
  • # 1) Sounds most attractive. Though, I'm not sure which files are these :/ — Could you lead me please Mark, if you have any idea? Feb 13 '13 at 14:23
  • Updated with the path I assume you'll want to start in. Feb 13 '13 at 14:25
  • Thanks Mark // let me see what I come up. I'll post it back if I get to change it. Feb 13 '13 at 14:25
  • What a bummer — Check this note from Image Lib User Docs (Note: Watermarking is only available using the GD/GD2 library. In addition, even though other libraries are supported, GD is required in order for the script to calculate the image properties. The image processing, however, will be performed with the library you specify. — ellislab.com/codeigniter/user-guide/libraries/image_lib.html) // There's no way to bypass this? Feb 13 '13 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.