Waterman not repeated and not transparent

  • Posts: 192
  • Thank you received: 1
12 years 10 months ago #44402

Hi,

i created a transparent 200px * 200px PNG watermark.
i uploaded it normally in the tab "Confirguration > File" and i upload next product images.

now comes the funny thing...
1. my transparent PNG is not anymore transparent on the product (lightbox) but transparent turned to light grey.
2. a standard watermark is repeated vertically and horizontally over the WHOLE picture, however in hikashop it is only display once... :-( as it is merge with original image during uploading, it is not possible to fix it with css (repeating at least).
3. a certain margin appears among borders of product image and the waterman. This should not be as the waterman should overlay the complete product image without margin.
4. Opacity even if i setup it at 50%, everything stays at 100% normal without transparency.

see the attached screenshot.

so what did i do wrong ?
thx.


What does not kill you, makes you stronger.
Attachments:
Last edit: 12 years 10 months ago by alain.roger.

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

  • Posts: 13201
  • Thank you received: 2322
12 years 10 months ago #44518

Hi alain.roger,

I think your problem is due to the image format.
Did you try with a different bit ratio ?
8bits maybe ?

Watermarks are for the moment not repeated horizontally or vertically, the best solution is to place it diagonally.
The margin is maybe an override made by your template.css file.

I think the opacity don't change because of the non-transparency of the picture.

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

  • Posts: 192
  • Thank you received: 1
12 years 9 months ago #44564

Hi Xavier,

based on you information, i created a PNG and a GIF in 8bit but i still have the same issue. margin on the bottom right side betweem watermark and product image and the watermark is not transparent but light grey :-(

i attached to this post a watermak example. as you can see the transparent background is really transparent.
so the problem is not in 8bit or 24 bits... neither in the format PNG or GIF... :-(
moreover how could my CSS create a bottom right margin for merging as the product image in light box has no css :-(


What does not kill you, makes you stronger.
Attachments:

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

  • Posts: 83103
  • Thank you received: 13418
  • MODERATOR
12 years 9 months ago #44797

Hi,

We tested that and we were able to reproduce the problem with your image. The problem seems to come from the transparent color used in the watermark image.
We've changed some stuff in the code which handles the watermark and it's now working on our end with your watermark.
Please replace the file administrator/components/com_hikashop/helper/image.php by the one in the archive enclosed and it should work for you too.

Attachments:

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

  • Posts: 192
  • Thank you received: 1
12 years 9 months ago #44815

Hi Nicolas,

so I've tested your updated version of image.php file.

Bugs
1. everytime i remove a product image and add a new image, in the front end, a new image is added to product detail form > thumbnail.
this is a bug as for example i have a product with only 1 product image and not in the front end, user can see 3 images :-(

product images on backend



frontend : what customer sees

or another product:



i tried to clear cache and purge old cache, but it didn't help... i tried in another browser that i never use for development and even if in this browser, i have multiple product images as thumbnails.


2. when i set transparency to 50%, the whole image (product image + watermark) are set to 50% transparency, so everything looks like light grey image..I don't know if we can tell it's a transparency are only watermark should have it's transparency changed and not the whole image. The whole image or only the watermark should not be "greyer" if transparency is something else than 100%, but it should be MORE transparent... at least this is for me what means transparency. (see difference between "original image" and "image 1".

Moreover i did the following test:
step 1: i set transparency to 50% and uploaded an image (image 1),
step 2: i set transparency to 100% and uploaded an image (image 2),
step 3: i set transparency to 50% and uploaded an image (image 3)

in theory, images 1 and 3 should look like the same...however in real life (and this is weird) image 3 is darker than image 1 even if image 1 and 3 have the same product image, the same transparency level and the same size :-(

original image:



image 1:



image 3:


3. when i upload my watermark, image quality is depreciated and it is no more such sharp and nice as it is before uploading.
before company logo was sharp, nice, readable, after upload into hikashop.... it is only somehow readable..
it is needed to keep the same quality in rendering product image with pasted watermark as both have before merging.

fixed bugs:
4. now, PNG image in 24 bits format are supported.

suggestion to improve component.
under Virtuemart, i had the following solution:
5. watermark was automatically (by VM) paste several times to cover the whole product image.
6. for end user, product + watermark became a new image (without possibility to save product image without saving watermak => to avoid image copyright to be violated)
7. no transparency parameter exists in VM, everything should be done previously in the watermark thumbnail picture.
8. the watermark was just an image, with simple size and its own transparency (png 24 bits works perfectly).
9. no quality lost before and after merging of watermark with product images.

this solution is much more flexible than solution in hikashop from my point of view. It lets no space for misunderstanding or misleading.


What does not kill you, makes you stronger.
Last edit: 12 years 9 months ago by alain.roger.

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

  • Posts: 83103
  • Thank you received: 13418
  • MODERATOR
12 years 9 months ago #44843

Hi,

1. We don't have that problem on our end. Are you saving your product after deleting the images ? Otherwise it won't do anything.

2. We fixed that on our end.

3. That's because of the way the merging is done in order to handle the transparency of both images. We couldn't find a solution for that for now. If someone has an idea, we'll be glad to try their code.

Thank you for your suggestions.
I don't think that doing everything the same as VM is the way to go but we'll keep that in mind when improving HikaShop in the future. Also, having the possibility to set the transparency in HikaShop directly allows non designers to use watermarks easily.

Attachments:

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

  • Posts: 192
  • Thank you received: 1
12 years 9 months ago #44965

Hi Nicolas,

i'm not telling you should do as in VM,i'm just tellingthat VM has a simple way to cope with that and it is working..plus it's easy to implement. nothing more :-)

for point 1, it is strange because even if i purge browser cache and joomla cache, the problem is still there.... and i don't know for which reason, it dissappeared, and after 1 day it reappeared again :-( strange behavior... i'm getting crazy with that :-)

for point 3, i do not need it as i set up transparency directly in my watermark... i just wanted to test it effect on the image.


What does not kill you, makes you stronger.

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

  • Posts: 192
  • Thank you received: 1
12 years 9 months ago #44968

Nicolas,

i've just tested your new version of image.php and here are the results:

1. If transparency is not set to 100%, the watermark is not applied or not visible at all.
2. whatever is the watermark (8 or 24 bits, Gif, PNG or something else) all colors except transparent one, are FULLY colored so if you have a light grey (as i use), once watermark applied, light grey will appears WHITE :-(

i don't know for you but for my point of view, it's worse as i was few days ago.

Any idea ?
thx.


What does not kill you, makes you stronger.

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

  • Posts: 83103
  • Thank you received: 13418
  • MODERATOR
12 years 9 months ago #46093

I'm out of ideas on this one. I tried several other things this past week but it didn't improve the result.


If I understand correctly, the best that you got was with the file from that post right:
www.hikashop.com/forum/4-how-to/44402-wa...t.html?lang=en#44797
by setting the opacity to 100 where the background would be transparent and the quality not degraded (which only happened when changing the opacity in HikaShop). I think that we'll stick with that for now, unless someone else finds a better code (we are open to suggestions ! ).

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

Time to create page: 0.115 seconds
Powered by Kunena Forum