Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Watermark - changing opacity level. 
 
nabuhonodozor
Member
 
Avatar
Total Posts:  51
Joined:  2008-03-27
 

Hi,
If You want to change opacity level for watermarks the file to edit is located: magento\lib\Varien\Image.php

Edit line 141 and change $watermarkImageOpacity=30 to Your needs.

Regards,
Piotr

ps does somebody knows how to force magento to use transparency in watermarked product pictures?

 
Magento Community Magento Community
Magento Community
Magento Community
 
whoscart
Sr. Member
 
Total Posts:  120
Joined:  2008-02-23
 

Did you ever find a solution to this? I am also looking for an open source watermarking software for my mac os x. Do you know of any?

 
Magento Community Magento Community
Magento Community
Magento Community
 
SCY
Member
 
Total Posts:  47
Joined:  2008-12-02
 

I have to create images with watermark itself in the PS manually as the the magento watermark is not transparent. This could be very handy if the background is set to transparent, and the product image look more clear in that way.

 
Magento Community Magento Community
Magento Community
Magento Community
 
emeraldco
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2009-02-21
 

In version 1.3.1 it is now located on line 174.  it would be nice if you could set this in the program.  Also some help on the size thing would also be nice.  I still can’t figure that one out.  I think I will just resize the images and reupload, that should be easier.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mhunkler
Guru
 
Total Posts:  304
Joined:  2009-05-30
 

EDIT: Nevermind

 
Magento Community Magento Community
Magento Community
Magento Community
 
chapagain
Sr. Member
 
Avatar
Total Posts:  202
Joined:  2009-07-19
 

Here is a better solution to create watermark image in magento.

Create Watermark Image in Magento

Cheers,

 
Magento Community Magento Community
Magento Community
Magento Community
 
chapagain
Sr. Member
 
Avatar
Total Posts:  202
Joined:  2009-07-19
 

Here is the code:-

$mainImage Mage::getBaseDir(\'media\') . DS \'test\' DS \'image.jpg\';
$watermarkImage Mage::getBaseDir(\'media\') . DS \'test\' DS \'watermark.jpg\';
 
$image 
= new Varien_Image($mainImage);
 
// set watermark image width
$image->setWatermarkWidth(100);
 
// set watermark image height
$image->setWatermarkHeigth(100);
 
// create watermark image
// watermark($watermarkImage, $positionX=0, $positionY=0, $watermarkImageOpacity=30, $repeat=false)
$image->watermark($watermarkImage);
 
// save the watermark image
$image->save(Mage::getBaseDir(\'media\'). DS \'test\' DS \'new.jpg\');
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top