I’ve got phpthumbof working fine for most of the things I want to do, however I can’t seem to get the filter section to work correctly.
I’m actually trying to watermark an image, but in the interests of tracking down where I’m going wrong I have tried a simple flip,
<image src='[[*image:phpthumbof=`fltr[]=flip|y`]]'/>
Can the ’fltr’ array be passed by phpthumbof? Can anyone see what I’m doing wrong here?
<image src='[[*image:phpthumbof=`fltr=flip|y`]]'/>
I’m having some performance issues with the cache. It takes my server 0.25 seconds to find and load the cached file. The problem here lies in this line:
/* ensure we have an accurate and clean cache directory */ $phpThumb->CleanUpCacheDirectory();
If I omit this line of code it speeds up the proces from 0.25 secs per thumb to 0.01 secs per thumb, which is awesomeThe question is however: does this result in any problems on the long term?
We’re going in production with this particular site and I thought it might be an idea to schedule a daily/hourly cronjob to execute this cache cleaning proces.
Any thoughts on this?
<img src="[[+tv.ImagePath]]" alt="" />
<img src="[[+!tv.ImagePath:phpthumbof=`&f=jpeg&q=75&wl=200&hp=200`]]" alt="" />
<img src="[[+tv.!ImagePath:phpthumbof=`&f=jpeg&q=75&wl=200&hp=200`]]" alt="" />
Hi all,
Is there a way to use PHPThumbOf with getResources TVs?
I have this image path that I’d like to apply the modifier to:
<img src="[[+tv.ImagePath]]" alt="" />
I’ve tried many variations of the call I could think of, but no image gets displayed.
Here are two calls I tried:
<img src="[[+!tv.ImagePath:phpthumbof=`&f=jpeg&q=75&wl=200&hp=200`]]" alt="" />
<img src="[[+tv.!ImagePath:phpthumbof=`&f=jpeg&q=75&wl=200&hp=200`]]" alt="" />
Also, where can I see a list of available parameters. The snippet source code was of no help in that regard.
<img src="[[+tv.ImagePath:phpthumbof=`&f=jpeg&q=75&wl=200&hp=200`]]" alt="" />
Also, where can I see a list of available parameters. The snippet source code was of no help in that regard.
<img src="[[+tv.ImagePath:phpthumbof=`&f=jpeg&q=75&wl=200&hp=200`]]" alt="" />
$params = array();
$params['input'] = $image; // URL to the large image
$options = '&f=jpg';
$options .= '&w='.$thumbnailsWidth;
$options .= '&h='.$thumbnailsHeight;
$options .= '&zc=1';
$options .= '&fltr=usm|'.$thumbnailsSharpen;
$params['options'] = $options;
$thumbnail = $modx->runSnippet("phpthumbof", $params);
[[*canvas:phpthumbof=`&f=png&w=600&h=24&zc=1&fltr=wmt|Welcome to MODx|17|TL|000000|assets/fonts/Helvetica.ttf|100|0|0|ebecec|0`]]
new = create new image, not thumbnail of existing image.
Requires "w" and "h" parameters set.
[ex: &new=FF0000|75] - red background, 75% opacity
Set to hex color string of background. Opacity is
optional (defaults to 100% opaque).