Author Topic: VM2 - Picture Watermark  (Read 8356 times)

Zekule

  • Beginner
  • *
  • Posts: 16
VM2 - Picture Watermark
« on: February 22, 2012, 14:19:25 pm »
Is there any way or code to insert a watermark on the product pictures?

Thanks.

morktron

  • Jr. Member
  • **
  • Posts: 120
    • digital solutions for sentient bipeds
Re: VM2 - Picture Watermark
« Reply #1 on: February 22, 2012, 23:34:41 pm »
Yes, you can do it with Magic Zoom Plus, you have to pay for it but it's worth it since they have great support and it all works for VM2.5 - unlike most things!

I have it working on this site in development - only for the product fly pages though

shyntaxx

  • Beginner
  • *
  • Posts: 42
    • Motorola unlock
Re: VM2 - Picture Watermark
« Reply #2 on: January 15, 2014, 03:39:58 am »
This is a prefectly easy and free solution for watermaking images :::

Apply Watermark image into Product Image of Virtuemart

Problem: When Creating an shopping website, we would like to apply a watermark image - logo and website name - on every picture of products. It is seem easy by this way: use an watermark program to apply icon on product picture, then upload that picture on hosting. Take a long time if you have over 50 products.
I want to do this work automatically, It means watermark picture will be applied in to all picture (old and new) of website

Solve: I do this work on Joomla 2.5 and Virtuemart 2.0. But I think it is comfortable for every happen load and show Image.
Step 1: Create file .htaccess on folder contain image, with Virtuemart 2.0, this folder is <your_domain>/images/stories/virtuemart/product.



RewriteRule ^(resized)($|/) - [L]

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -f

RewriteRule \.(gif|jpeg|jpg|png)$ watermark.php [QSA,NC]


Step 2: Create file watermark.php at same folder of .htaccess with content:


<?php

// watermark.php
// Path the the requested file

$path = $_SERVER['DOCUMENT_ROOT'].$_SERVER['REQUEST_URI'];
// Load the requested image

$image = imagecreatefromstring(file_get_contents($path));$w = imagesx($image);$h = imagesy($image);
// Load the watermark image

$watermark = imagecreatefrompng('watermark.png');$ww = imagesx($watermark);$wh = imagesy($watermark);
// Merge watermark upon the original image (centred)

imagecopy($image, $watermark, (($w/2)-($ww/2)), (($h/2)-($wh/2)), 0, 0, $ww, $wh);

// Send the image

header('Content-type: image/jpeg');imagejpeg($image,null,95);
exit();?>

Step 3: Create an watermark.png with transparent background and upload to that folder.
Done.
Now you can test all image file in folder <your_domain>/images/stories/virtuemart/product have watermark if you call them on your website

Note: the code line RewriteRule ^(resized)($|/) - [L] in .htaccess file ensure that all thumbnail file in resized folder will be not watermarked. If you want to watermark on both thumbnail and large picture, you can remove that line

CREDITS: mtkcode.blogspot.hu/2013/07/apply-watermark-image-into-product.html

fkeller

  • Beginner
  • *
  • Posts: 5
Re: VM2 - Picture Watermark
« Reply #3 on: April 05, 2018, 08:30:11 am »
My VM3 product pictures are NOT in:

Quote
<your_domain>/images/stories/virtuemart/product.

So if it isn't working for you try to put everything in:

<your_domain>/images/virtuemart/product


jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28071
  • Always on vacation
    • Jenkin Hill Internet
Re: VM2 - Picture Watermark
« Reply #4 on: April 05, 2018, 11:18:50 am »
Four years ago, when the old thread you posted to was written, Joomla was at J2.5 and VM was at VM2.0  Things have changed since then!

The stories folder has been removed from Joomla 3 so VM product images are now stored in images/virtuemart/product
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart 3.8.9.10473 on Joomla 3.9.24 PHP 7.4.14

marvays

  • Jr. Member
  • **
  • Posts: 362
    • richta.cz
  • Skype Name: marvays
Re: VM2 - Picture Watermark
« Reply #5 on: August 10, 2020, 17:57:17 pm »
iTS NO GOOG SOLUTION.
you need to protect large images / product, not small product / resized thumbnails. . . so this works exactly the opposite of what is logical.

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 951
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: VM2 - Picture Watermark
« Reply #6 on: August 10, 2020, 18:13:04 pm »
Quote
This is a prefectly easy and free solution for watermaking images :::

Perfectly easy solution only for mad customers :)
If I send feed with pictures with watermarks to the Google Merchant Centre, all products are banned.

"Before I use my brain, I shake my head"
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

marvays

  • Jr. Member
  • **
  • Posts: 362
    • richta.cz
  • Skype Name: marvays
Re: VM2 - Picture Watermark
« Reply #7 on: August 10, 2020, 19:45:07 pm »
If I send feed with pictures with watermarks to the Google Merchant Centre, all products are banned.
You're right. I would solve this by pasting watermark on the original large images from the /product folder. I can send images from the /product/resized folder to merchant centers and other similar services where the images are 300x300 and will not have a watermark.

It would also be possible to render a copy of the original images without watermark in a folder with a random name and send it to google merchant centers. The visitor would not find this folder.

There are many ways to do this. Just not this first one, when the big picture will be clean and the small one will have a watermark. Because thieves want a big picture :)

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 951
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: VM2 - Picture Watermark
« Reply #8 on: August 10, 2020, 21:11:06 pm »
Quote
I can send images from the /product/resized folder to merchant centers and other similar services where the images are 300x300 and will not have a watermark.

Quote
It would also be possible to render a copy of the original images without watermark in a folder with a random name and send it to google merchant centers. The visitor would not find this folder.

Quote
There are many ways to do this.

Martine,

really do you understand, how function really ecommerce bussines, not funny eshops?
Really do you send in Google Nákupy only picture 300x300px - is really the best solution for your eshop, if I find the same products on another eshops with clean picture 600x600 or 900x900px?
Really do you understand how google control information in feed on live eshop (not only in feed, but on live eshop too with their application with selenium scripts)?

I think all posts with many ways how use watermark is not for me or not for really ecommerce bussiness.

Take my posts only as information and do it how do you want... our eshops is not my eshops :)

Best Regards
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

marvays

  • Jr. Member
  • **
  • Posts: 362
    • richta.cz
  • Skype Name: marvays
Re: VM2 - Picture Watermark
« Reply #9 on: August 10, 2020, 21:28:12 pm »
***

Yes, I know how real e-shops work. And I know, how google shopping works. And you? :)

Product data specification:
https://support.google.com/merchants/answer/7052112?visit_id=1-636241173656719253-177496481&rd=1&hl=en

When you look at google purchases, you will see that google displays the largest image in 300x300 resolution.

image_ link
For non-apparel products, use an image of at least 100 x 100 pixels
For apparel products, use an image of at least 250 x 250 pixels

But this is not about how big an image I send to google purchases, but that I can show the visitor an image with a watermark and google send an image of any size without a watermark. And all because of the photo thieves.

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 951
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: VM2 - Picture Watermark
« Reply #10 on: August 10, 2020, 21:44:00 pm »
But google control your information on feed and send you back info, that your product is banned because picture is with watermark (not in feed, but on live eshop)...
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 951
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: VM2 - Picture Watermark
« Reply #11 on: August 10, 2020, 21:53:23 pm »
Quote
For non-apparel products, use an image of at least 100 x 100 pixels
For apparel products, use an image of at least 250 x 250 pixels

Again :)
And maybe czech?

Martine, jak myslíš že bude bussinesově úspěšný eshop, který posílá do GMC fotky jen o velikosti 300x300px (resized), když v Google nákupech najdu stejné produkty s krásnou velkou fotkou?
Mám 2 minuty abych se rozhodl.
At least == nejméně.

Martin, how do you think it will be a successful business e-shop that sends photos to GMC only 300x300px (resized), when I find the same products with a beautiful big photo in Google Merchant Centre?
I have 2 minutes to decide.

And I think I wrote all what I want :)
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

marvays

  • Jr. Member
  • **
  • Posts: 362
    • richta.cz
  • Skype Name: marvays
Re: VM2 - Picture Watermark
« Reply #12 on: August 10, 2020, 22:18:14 pm »
Větší fotku než 300x300 v google nákupech nenajdeš. A máš spíš dvě vteřiny, než dvě minuty :)
Daleko větší problém je heureka či zbožíCZ . . . protože tam jsou obrázky daleko větší. A tím se dostáváme do začarovaného kruhu. Použít velkou krásnou fotku, kterou jsem si nechal draze nafotit a vím, že mi ji konkurence ukradne? Nebo na webu použít tuhle krásnou fotku s vodoznakem a do srovnávačů zboží poslat bez vodoznaku, ale v menším rozlišení, abych výrazně omezil zneužití?

marvays

  • Jr. Member
  • **
  • Posts: 362
    • richta.cz
  • Skype Name: marvays
Re: VM2 - Picture Watermark
« Reply #13 on: August 18, 2020, 15:10:49 pm »
And . . . . I came up with another solution. Upload the first photo without a watermark, more photos with a watermark. Create a hack and hide the display of the first photo on the product detail page. Is it possible to create such a hack?