Removing the watermark

  • Posts: 82866
  • Thank you received: 13373
  • MODERATOR
13 years 9 months ago #8758

You can read more about what is GD on that page: en.wikipedia.org/wiki/GD_Graphics_Library

Please Log in or Create an account to join the conversation.

  • Posts: 32
  • Thank you received: 1
13 years 9 months ago #8818

I'm also getting black squares, when trying to use the watermark feature. Could you please say what version of gd is required? Apologies if I missed this information somewhere.

-Henry

Please Log in or Create an account to join the conversation.

  • Posts: 82866
  • Thank you received: 13373
  • MODERATOR
13 years 9 months ago #8850

You need at least GD 2.0.1 (2.0.28 or later is recommended).

Do you have an alpha channel in your watermark ?

Please Log in or Create an account to join the conversation.

  • Posts: 32
  • Thank you received: 1
13 years 9 months ago #8852

| You need at least GD 2.0.1 (2.0.28 or later is recommended).

Well, the version on the server is 2.0.35. However, PHP5-gd is also installed, and it is "5.2.4-2ubuntu5.14". It seems to be much smaller than the version on the server.

| Do you have an alpha channel in your watermark ?

Yes, I initially tried a transparent png. The resulting black square does show the watermark (but not the original image). Then I tried with a transparent gif, and got a black background with a blue square where the watermark should be.

Thank you as usual for your fast response.

Please Log in or Create an account to join the conversation.

  • Posts: 82866
  • Thank you received: 13373
  • MODERATOR
13 years 9 months ago #8854

If you replace the line:
$this->imagecopymerge_alpha($thumb, $watermark, $dest_x, $dest_y, 0, 0, $wm_width, $wm_height, (int)$config->get('opacity',0));

by:
imagecopymerge($thumb, $watermark, $dest_x, $dest_y, 0, 0, $wm_width, $wm_height, (int)$config->get('opacity',0));

in the file administrator/components/com_hikashop/helpers/image.php that will remove the alpha channel support of the watermark. Does the watermark works in such cases ?

Please Log in or Create an account to join the conversation.

  • Posts: 32
  • Thank you received: 1
13 years 9 months ago #8867

Hello Nicolas,

I made the change to image.php, but it made no difference.

Thank you once more -- I appreciate your help.

-Henry

Please Log in or Create an account to join the conversation.

  • Posts: 82866
  • Thank you received: 13373
  • MODERATOR
13 years 9 months ago #8868

Mmm. I'm out of ideas on this one.

Please Log in or Create an account to join the conversation.

  • Posts: 392
  • Thank you received: 0
13 years 9 months ago #8874

Thank you so mch for helping me with this :) You also fixed another issue for me so Im twice as happy now :)

Please Log in or Create an account to join the conversation.

  • Posts: 392
  • Thank you received: 0
13 years 7 months ago #14401

Hi Nicolas,

The black imagea are happening again, but only for 2 products, the rest of the product images are fine. Do you think its the GD library?

Thanks :)

Please Log in or Create an account to join the conversation.

  • Posts: 82866
  • Thank you received: 13373
  • MODERATOR
13 years 7 months ago #14402

We didn't had any bug report concerning thumbnails in the past month so I assume that things are working great with the versions above 1.4.7
Which version are you using ?
It is because of the watermark ?
Are these images different from the others ? Different format ? Different options of the format ?

Please Log in or Create an account to join the conversation.

  • Posts: 392
  • Thank you received: 0
13 years 7 months ago #14403

Im pretty sure im using the latest version... How do I figure out if I am or not?
Nope, the imageas are jpegs like the rest of them.
It could be the watermark, it is similar to the old problem...

Sorry I can't be of better help :/

Please Log in or Create an account to join the conversation.

  • Posts: 82866
  • Thank you received: 13373
  • MODERATOR
13 years 7 months ago #14409

Black images means that GD couldn't process the image. It could be because of transparency, because of file format, file path, etc. So hard to say.
If you remove the watermark and try again to upload the image, does it work ? Is it only the thumbnail which has a watermark or only the thumbnail or both?

Please Log in or Create an account to join the conversation.

  • Posts: 392
  • Thank you received: 0
13 years 7 months ago #14449

I just checked everything you mentioned, and it wasn't the watermark.

It was happening to the thumnails and the images, so I re-saved the images to my computer, uploaded them again, and now it works fine. So not a problem with a Hika Shop!

Thanks for your help! :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.084 seconds
Powered by Kunena Forum