Magento Forum

   
Unsharp mask? 
 
mffowler
Member
 
Total Posts:  31
Joined:  2008-05-16
 

Does anyone know how to run an unsharp mask with the built in imaging code? Is it GD Library that Magento uses?

Thanks,

 
Magento Community Magento Community
Magento Community
Magento Community
 
lisali
Enthusiast
 
Avatar
Total Posts:  888
Joined:  2008-04-28
London, UK
 

Hi,

Do not know much about GD, but Magento is using DG2 located in:

lib/Varien/Image/Adapter/Gd2.php

Good luck!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Robert Schneider
Jr. Member
 
Total Posts:  4
Joined:  2008-03-18
 

old thread, i know ... but maybe someone will also tumble over this, like me.

you can easily integrate the following script into the GD2 file (or somewhere else) as a function to do unsharp masking for the thumbnails:
http://vikjavev.no/computing/ump.php

just put it to the other functions below ... and replace:

//return $img;
$this->_imageHandler $img;

finally use something like that in the “save” function:

$this->UnsharpMask($this->_imageHandler700.53);

Rob

 
Magento Community Magento Community
Magento Community
Magento Community
 
mrrobotoplus
Jr. Member
 
Total Posts:  6
Joined:  2009-05-09
 

where is the save function?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Robert Schneider
Jr. Member
 
Total Posts:  4
Joined:  2008-03-18
 

you don’t need a save function, the unsharp mask works on-the-fly
i attached the modified file Gd2.php

regards
Rob

File Attachments
Gd2.php  (File Size: 23KB - Downloads: 74)
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top