SuperSizer($strPath, $strSavePath, $strType, $value, $Quality, $crop, $SAMPLE, $boolProtect, $filter, $fa1, $fa2, $fa3, $fa4);
}
function SuperSizer($strPath='', $strSavePath='', $strType = 'W', $value = '150', $Quality = 85, $crop=false, $SAMPLE=true, $boolProtect = true, $filter=null, $fa1=null, $fa2=null, $fa3=null, $fa4=null){
if($strSavePath!=''){
//$this->strOriginalImagePath = str_replace(" ", "%20", $strPath);
$this->strOriginalImagePath = rawurldecode($strPath);
$this->strResizedImagePath = $strSavePath;
$this->boolProtect = $boolProtect;
//get the image dimensions
if(!@getimagesize($this->strOriginalImagePath)){
echo "
There is a path issue!
Does this look right?
Path:".$this->strOriginalImagePath."
";
return false;
}else{
$this->arrOriginalDetails = getimagesize($this->strOriginalImagePath);
}
$this->arrResizedDetails = $this->arrOriginalDetails;
//create an image resouce to work with
$this->resOriginalImage = $this->createImage($this->strOriginalImagePath);
//select the image resize type
switch(strtoupper($strType)){
case 'P':
$this->resizeToPercent($value, $Quality, $crop, $SAMPLE, $filter, $fa1, $fa2, $fa3, $fa4);
break;
case 'H':
$this->resizeToHeight($value, $Quality, $crop, $SAMPLE, $filter, $fa1, $fa2, $fa3, $fa4);
break;
case 'C':
$this->resizeToCustom($value, $Quality, $crop, $SAMPLE, $filter, $fa1, $fa2, $fa3, $fa4);
break;
case 'W':
default:
$this->resizeToWidth($value, $Quality, $crop, $SAMPLE, $filter, $fa1, $fa2, $fa3, $fa4);
break;
}
}
}
function findResourceDetails($resImage){
//check to see what image is being requested
if($resImage==$this->resResizedImage){
//return new image details
return $this->arrResizedDetails;
}else{
//return original image details
return $this->arrOriginalDetails;
}
}
function updateNewDetails(){
$this->arrResizedDetails[0] = imagesx($this->resResizedImage);
$this->arrResizedDetails[1] = imagesy($this->resResizedImage);
}
function createImage($strImagePath){
//get the image details
$arrDetails = $this->findResourceDetails($strImagePath);
//choose the correct function for the image type
switch($arrDetails['mime']){
case 'image/jpeg':
return imagecreatefromjpeg($strImagePath);
break;
case 'image/png':
return imagecreatefrompng($strImagePath);
break;
case 'image/gif':
return imagecreatefromgif($strImagePath);
break;
}
}
function filters($filter, $fa1, $fa2, $fa3, $fa4){
//choose the correct function for the image type
switch($filter){
case 'NEGATE':
return imagefilter($this->resResizedImage, IMG_FILTER_NEGATE);
break;
case 'GRAYSCALE':
return imagefilter($this->resResizedImage, IMG_FILTER_GRAYSCALE);
break;
case 'BRIGHTNESS':
return imagefilter($this->resResizedImage, IMG_FILTER_BRIGHTNESS, $fa1);
break;
case 'CONTRAST':
return imagefilter($this->resResizedImage, IMG_FILTER_CONTRAST, $fa1);
break;
case 'COLORIZE':
return imagefilter($this->resResizedImage, IMG_FILTER_COLORIZE, $fa1, $fa2, $fa3, $fa4);
break;
case 'EDGEDETECT':
return imagefilter($this->resResizedImage, IMG_FILTER_EDGEDETECT);
break;
case 'EMBOSS':
return imagefilter($this->resResizedImage, IMG_FILTER_EMBOSS);
break;
case 'GAUSSIAN_BLUR':
return imagefilter($this->resResizedImage, IMG_FILTER_GAUSSIAN_BLUR);
break;
case 'SELECTIVE_BLUR':
return imagefilter($this->resResizedImage, IMG_FILTER_SELECTIVE_BLUR);
break;
case 'MEAN_REMOVAL':
return imagefilter($this->resResizedImage, IMG_FILTER_MEAN_REMOVAL);
break;
case 'SMOOTH':
return imagefilter($this->resResizedImage, IMG_FILTER_SMOOTH, $fa1);
break;
case 'PIXELATE':
return imagefilter($this->resResizedImage, IMG_FILTER_PIXELATE, $fa1,$fa2);
break;
case 'IMAGEHUE':
$this->imagefilterhue($this->resResizedImage,$fa1, $fa2, $fa3);
break;
}
}
function imagefilterhue($im,$r,$g,$b){
$rgb = $r+$g+$b;
$col = array($r/$rgb,$b/$rgb,$g/$rgb);
$height = imagesy($im);
$width = imagesx($im);
for($x=0; $x<$width; $x++){
for($y=0; $y<$height; $y++){
$rgb = ImageColorAt($im, $x, $y);
$r = ($rgb >> 16) & 0xFF;
$g = ($rgb >> 8) & 0xFF;
$b = $rgb & 0xFF;
$newR = $r*$col[0] + $g*$col[1] + $b*$col[2];
$newG = $r*$col[2] + $g*$col[0] + $b*$col[1];
$newB = $r*$col[1] + $g*$col[2] + $b*$col[0];
$img=imagesetpixel($im, $x, $y,imagecolorallocate($im, $newR, $newG, $newB));
}
}
return $img;
}
function saveImage($Quality = 85){
switch($this->arrResizedDetails['mime']){
case 'image/jpeg':
imagejpeg($this->resResizedImage, $this->strResizedImagePath, $Quality);
break;
case 'image/png':
// imagepng = [0-9] (not [0-100])
$newNumber=$Quality/10;
$Quality = number_format($newNumber, 0, '.', '');
imagepng($this->resResizedImage, $this->strResizedImagePath, $Quality);
break;
case 'image/gif':
imagegif($this->resResizedImage, $this->strResizedImagePath);
break;
}
}
function showImage($resImage){
//get the image details
$arrDetails = $this->findResourceDetails($resImage);
//set the correct header for the image we are displaying
header("Content-type: ".$arrDetails['mime']);
switch($arrDetails['mime']){
case 'image/jpeg':
return imagejpeg($resImage);
break;
case 'image/png':
return imagepng($resImage);
break;
case 'image/gif':
return imagegif($resImage);
break;
}
}
function destroyImage($resImage){
imagedestroy($resImage);
}
function _resize($numWidth, $numHeight, $Quality, $crop, $SAMPLE, $filter, $fa1, $fa2, $fa3, $fa4){
//check for image protection
if($this->_imageProtect($numWidth, $numHeight)){
if($this->arrOriginalDetails['mime']=='image/jpeg'){
//JPG image
$this->resResizedImage = imagecreatetruecolor($numWidth, $numHeight);
imageantialias($this->resResizedImage, true);
}else if($this->arrOriginalDetails['mime']=='image/gif'){
//GIF image
$this->resResizedImage = imagecreatetruecolor($numWidth, $numHeight);
imagetruecolortopalette($this->resResizedImage, true, 256);
imageantialias($this->resResizedImage, true);
imagealphablending($this->resResizedImage, false);
imagesavealpha($this->resResizedImage,true);
$transparent = imagecolorallocatealpha($this->resResizedImage, 255, 255, 255, 127);
imagefilledrectangle($this->resResizedImage, 0, 0, $numWidth, $numHeight, $transparent);
imagecolortransparent($this->resResizedImage, $transparent);
}else if($this->arrOriginalDetails['mime']=='image/png'){
//PNG image
$this->resResizedImage = imagecreatetruecolor($numWidth, $numHeight);
imagecolortransparent($this->resResizedImage, imagecolorallocate($this->resResizedImage, 0, 0, 0));
// Turn off transparency blending (temporarily)
imagealphablending($this->resResizedImage, false);
// Create a new transparent color for image
$color = imagecolorallocatealpha($this->resResizedImage, 0, 0, 0, 127);
// Completely fill the background of the new image with allocated color.
imagefill($this->resResizedImage, 0, 0, $color);
// Restore transparency blending
imagesavealpha($this->resResizedImage, true);
}
$src_x = 0;
$src_y = 0;
$dst_x = 0;
$dst_y = 0;
$dst_w=$numWidth;
$dst_h=$numHeight;
$src_w=$this->arrOriginalDetails[0];
$src_h=$this->arrOriginalDetails[1];
$crop="true";
if($crop[0]==true){
if(strlen($crop)>=4){$crop=explode(",", $crop);}else{$crop="true,0,0";}
//if the image is smaller than crop size
//we're always going to crop from center
$src_x = $src_y = 0;
$src_w = $src_w;
$src_h = $src_h;
$cmp_x = $src_w / $dst_w;
$cmp_y = $src_h / $dst_h;
// calculate x or y coordinate and width or height of source
if ( $cmp_x > $cmp_y ) {
$src_w = round( ( $src_w / $cmp_x * $cmp_y ) );
$src_x = round( ( $src_w - ( $src_w / $cmp_x * $cmp_y ) ) / 2 )+$crop[1];
} elseif ( $cmp_y > $cmp_x ) {
$src_h = round( ( $src_h / $cmp_y * $cmp_x ) );
$src_y = round( ( $src_h - ( $src_h / $cmp_y * $cmp_x ) ) / 2 )+$crop[2];
}
}
//update the image size details
$this->updateNewDetails();
if($SAMPLE==true){
//do the actual image resize
imagecopyresampled($this->resResizedImage, $this->resOriginalImage, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);
}else{
imagecopyresized ($this->resResizedImage, $this->resOriginalImage, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);
}
if($filter!=""){
//filter
// Here we split the variables.
$FiltersArray = explode(",", $filter);
$Fa1Array = explode(",", $fa1);
$Fa2Array = explode(",", $fa2);
$Fa3Array = explode(",", $fa3);
$Fa3Array = explode(",", $fa4);
$i = 0;
foreach ($FiltersArray as $Filter){
$this->filters($FiltersArray[$i], $Fa1Array[$i], $Fa2Array[$i], $Fa3Array[$i], $Fa4Array[$i]);
$i++;
}
//$this->filters($filter, $fa1, $fa2, $fa3, $fa4);
}
//saves the image
$this->saveImage($Quality);
}
}
function _imageProtect($numWidth, $numHeight){
if($this->boolProtect AND ($numWidth > $this->arrOriginalDetails[0] OR $numHeight > $this->arrOriginalDetails[1])){
return 0;
}
return 1;
}
function resizeToWidth($numWidth, $Quality, $crop, $SAMPLE, $filter, $fa1, $fa2, $fa3, $fa4){
$numHeight=(int)(($numWidth*$this->arrOriginalDetails[1])/$this->arrOriginalDetails[0]);
$this->_resize($numWidth, $numHeight, $Quality, $crop, $SAMPLE, $filter, $fa1, $fa2, $fa3, $fa4);
}
function resizeToHeight($numHeight, $Quality, $crop, $SAMPLE, $filter, $fa1, $fa2, $fa3, $fa4){
$numWidth=(int)(($numHeight*$this->arrOriginalDetails[0])/$this->arrOriginalDetails[1]);
$this->_resize($numWidth, $numHeight, $Quality, $crop, $SAMPLE, $filter, $fa1, $fa2, $fa3, $fa4);
}
function resizeToPercent($numPercent, $Quality, $crop, $SAMPLE, $filter, $fa1, $fa2, $fa3, $fa4){
$numWidth = (int)(($this->arrOriginalDetails[0]/100)*$numPercent);
$numHeight = (int)(($this->arrOriginalDetails[1]/100)*$numPercent);
$this->_resize($numWidth, $numHeight, $Quality, $crop, $SAMPLE, $filter, $fa1, $fa2, $fa3, $fa4);
}
function resizeToCustom($size, $Quality, $crop, $SAMPLE, $filter, $fa1, $fa2, $fa3, $fa4){
if(!is_array($size)){
$this->_resize((int)$size, (int)$size, $Quality, $crop, $SAMPLE, $filter, $fa1, $fa2, $fa3, $fa4);
}else{
$this->_resize((int)$size[0], (int)$size[1], $Quality, $crop, $SAMPLE, $filter, $fa1, $fa2, $fa3, $fa4);
}
}
function recursive_rmdir($dir)
{
// all subdirectories and contents:
if(is_dir($dir)){
$dir_handle=opendir($dir);
}else{
return false;
}
while($file=readdir($dir_handle))
{
if($file!="." && $file!="..")
{
if(!is_dir($dir."/".$file))unlink ($dir."/".$file);
else $this->recursive_rmdir($dir."/".$file);
}
}
closedir($dir_handle);
rmdir($dir);
return true;
}
}
function smarty_cms_function_supersizer($params, &$smarty) {
global $gCms;
$config =& $gCms->GetConfig();
$debugIT = isset($params['debugIT']) ? $params['debugIT']:false;
$noOutPut = isset($params['noOutPut']) ? $params['noOutPut']:false;
$path = isset($params['path']) ? $params['path']:false;
$Prefix = isset($params['Prefix']) ? $params['Prefix']:'';
$Suffix = isset($params['Suffix']) ? $params['Suffix']:'';
$Subdir = isset($params['Subdir']) ? $params['Subdir'] : "";
$stripTags = isset($params['stripTags']) ? $params['stripTags'] : false;
if($stripTags==true){
$path = preg_replace('/.*src=([\'"])((?:(?!\1).)*)\1.*/si','$2',$path);
}
$removeUniqueness = isset($params['removeUniqueness']) ? $params['removeUniqueness'] : false;
$URL = isset($params['URL']) ? $params['URL']:'';
$OlDextension = substr($path, (strrpos($path,".")+1));
$extension = strtolower(substr($path, (strrpos($path,".")+1)));
$filebasename = basename($path, $OlDextension);
$crop = isset($params['crop']) ? $params['crop'] : false;
$SAMPLE = isset($params['Sample']) ? $params['Sample']:true;
$filter = isset($params['filter']) ? $params['filter'] : "";
if(!isset($params['width']) && !isset($params['height']) && !isset($params['percentage'])) {
$percentage = 25;
}else{
$width = isset($params['width']) ? intval($params['width']) : 0;
$height = isset($params['height']) ? intval($params['height']) : 0;
$percentage = isset($params['percentage']) ? intval($params['percentage']) : 0;
}
if(isset($Subdir)){
if ((substr($Subdir, 0,1))=="/"){$Subdir=substr_replace($Subdir, '', 0, 1);}
if (((substr($Subdir, -1))!="/")&&$Subdir!=''){$Subdir.='/';}
}
if(isset($path)){
if ((substr($path, 0,5))=="http:"){$L=strlen($config['root_url']);$path = substr_replace($path, '', 0, $L);}
if ((substr($path, 0,1))=='/'){$path=substr_replace($path, '', 0, 1);}
}else{
echo "You have forgot to define the orginal image. Please do so.
";
}
$U='';
if($removeUniqueness==false){
$U="-w".$width."-h".$height."-p".$percentage."-F".$filter."-S".$SAMPLE;
}
$path=$config['root_path']."/".$path;
$rootUrl = isset($params['rootUrl']) ? $params['rootUrl'] : $config['uploads_url'];
$filename=$config['uploads_path']."/SuperSizerTmp/".$Subdir.$Prefix.$filebasename.$U.$Suffix.".".$extension;
$fileLINK=$rootUrl."/SuperSizerTmp/".$Subdir.$Prefix.$filebasename.$U.$Suffix.".".$extension;
$Protect= isset($params['Protect']) ? $params['Protect'] : true;
if(file_exists($filename)){
if($debugIT==true){
unlink ($filename);
//smarty_cms_function_supersizer($params, &$smarty);
}elseif(@filemtime($filename) < @filemtime($path)){
unlink ($filename);
}
}
if(!file_exists($filename)){
if(!file_exists($config['uploads_path']."/SuperSizerTmp/".$Subdir)){
mkdir($config['uploads_path']."/SuperSizerTmp/".$Subdir, 0777, true);
}
$Quality = isset($params['Quality']) ? intval($params['Quality']) : 85;
$cacheBuster = isset($params['cacheBuster']) ? $params['cacheBuster']:false;
$fa1 = isset($params['farg1']) ? $params['farg1'] : "";
$fa2 = isset($params['farg2']) ? $params['farg2'] : "";
$fa3 = isset($params['farg3']) ? $params['farg3'] : "";
$fa4 = isset($params['farg4']) ? $params['farg4'] : "";
if($width>0 || $height>0) {
if ($width>0 && $height==0){
$objResize = new SuperSizer($path, $filename, 'W', $width, $Quality, $crop, $SAMPLE, $Protect,$filter, $fa1, $fa2, $fa3, $fa4);
}elseif($height>0 && $width==0){
$objResize = new SuperSizer($path, $filename, 'H', $height, $Quality, $crop,$SAMPLE, $Protect, $filter, $fa1, $fa2, $fa3, $fa4);
}else{
$objResize = new SuperSizer($path, $filename, 'C', array($width, $height), $Quality, $crop, $SAMPLE, $Protect, $filter, $fa1, $fa2, $fa3, $fa4);
}
}else{
$objResize = new SuperSizer($path, $filename, 'P', $percentage, $Quality, $crop, $SAMPLE, $Protect,$filter, $filterarg1, $fa1, $fa2, $fa3, $fa4);
}
if($debugIT==true){
echo 'Original Image
';
print_r($objResize->findResourceDetails($objResize->resOriginalImage));
echo '
Resized Image
';
print_r($objResize->findResourceDetails($objResize->resResizedImage));
echo '
';
error_reporting(E_ALL);
}
}
if($noOutPut==false){
$Assign = isset($params['Assign']) ? $params['Assign']:'';
if($cacheBuster==true){
$fileLINK=$fileLINK."?".@filemtime($filename);
}
if($URL!=true){
$class = isset($params['class']) ? ' class="'.$params['class'].'" ':'';
$alt = isset($params['alt']) ? ' alt="'.$params['alt'].'" ':'';
$id = isset($params['id']) ? ' id="'.$params['id'].'" ':'';
$title = isset($params['title']) ? ' title="'.$params['title'].'" ':'';
$style = isset($params['style']) ? ' style="'.$params['style'].'" ':'';
if($Assign!=''){
$smarty->assign($Assign,"
");
}else{
echo "
";
}
}else{
if($Assign!=''){
$smarty->assign($Assign,$fileLINK);
}else{
echo $fileLINK;
}
}
}
}
function smarty_cms_help_function_supersizer() {
global $gCms;
$config =& $gCms->GetConfig();
if(isset($_POST['clearcache'])&&$_POST['clearcache']==1){
$objResize = new SuperSizer();
$dirpath=$config['uploads_path']."/SuperSizerTmp/";
$deleted = $objResize->recursive_rmdir($dirpath);
if($deleted){
echo "Cleared $dirpath
";
}else{
echo "Sorry: $dirpath
DOES NOT yet exist run the plug-in on an image first.
";
}
}
echo "Your cache path is: ".$config['uploads_path']."/SuperSizerTmp/";
echo'';
?>
What does this tag do?
- Creates a resized version of an image on the fly.
- Creates a cached version of the image to be served.
- It supports any image format supported by the GD library
- It supports Subdomain image severing for optimal setup
- 50 user uploaded images to as many as your server can hold
- GAIN FULL CONTROL!!!!
How do I use this tag?
Just insert the tag into your template/page like in one of the examples here:
1. {supersizer path='uploads/images/test.jpg' percentage='25'}
2. {supersizer path='uploads/images/test.jpg' width='320'} (With aspect ratio)
3. {supersizer path='uploads/images/test.jpg' height='240'} (With aspect ratio)
4. {supersizer path='uploads/images/test.jpg' width='150' height='140'} (Aspect ratio depends on given width, height)
5. {supersizer path="$LogoSub" width='150' rootUrl="http://media.domain.org/uploads"}
5. {supersizer path=$File height="200" width="200" crop=true filter="SMOOTH,GRAYSCALE,COLORIZE" farg1="50,,60" farg2=",,45" farg3=",,10" farg4=",,0"}<<< HOW TO DO sepia
5. {supersizer path="$LogoSub" width='150' class='LogoImg' alt="$Name" rootUrl="http://media.domain.org/uploads" Quality=55}
What parameters does it take?
path - Image full pathname eg: uploads/images/test.jpg or $entry->logo_path in Company Directory etc...
rootUrl (optional) - supersizer creates a temp director in the upload folder. If you move the path to the uplaod to a subdomain you may guide the output with this.
- Exapmle: you changed
$config['uploads_path'] = '/var/www/vhosts/domain.org/httpdocs/uploads';
- to
$config['uploads_path'] = '/var/www/vhosts/domain.org/subdomains/media/httpdocs/uploads';
- now the uploads url would not work as it would be http://www.domain.org/uploads
- So it can be changed here to http://media.domain.org/uploads (NOTE: watch your / )
- For an example visit http://www.visitnorthcentralidaho.org/SERVICES-and-MERCHANTS.html and drill down to a company to which you'll see images coming from the subdomain
cacheBuster (optional) Default:false - This is to instantly uncache an image on the client side after a new uploaded photo is SuperSized... ie: Canyon House.-w150-h0-p0.jpg?1255225007 ( true/false )
Protect (optional) Default:true - Don't resize if smaller.. ie: don't size up if true ( true/false )
Quality (optional) Default:85 - Resize image at set Quality(NOTE: 1-100 ).
class (optional) - Add a class
alt (optional) - Add an alt
id (optional) - Add an id
title (optional) - Add a title
style (optional) - Add a inline style
Sample (optional) Default:true - Set false to choose a low quality resize which can be much fast in the processing time. Remember the image is only resized once and then cached so this is only needed for sites with ultra high turnover on the resized images.( true/false )
stripTag (optional) Default:false - stripTag take a full img tag passed in by the param path="" and makes it usable for SuperSizer ( true/false )
removeUniqueness (optional) Default:false - Highly discouraged Remove uniqueness of the created file, or in other words keep the old name ( true/false )
crop (optional) Default:false - A must if you set height and width or use a percentage This will center the image and crop from edge in. Don't like that? Use the X and Y arguments to offset, but the pxs are in relation to the original size image, if you need to make that dynamic use smarty magic. Example: to move to the left of center crop="true,-50, 0" ( "true,X,Y"/"false" )
URL (optional) - just sizes and outputs the url. You could use this in and XML output, let's say to make a map icon for CGGoogleMaps thru a CGFeedmaker output of a kml/xml
noOutPut (optional) Default:false - just sizes the image. This is good for galleries ( true/false )
Prefix (optional) - Add a Prefix to the temp file name
Suffix (optional) - Add a Suffix to the temp file name
Subdir (optional) - Create Subfolders -- Organize your photos from within the SuperSizerTmp folder ( Subdir=$oneuser.id or Subdir="foo/bar")
filter (optional) - EX: filter="NEGATE" join them like this filter="NEGATE,GRAYSCALE" Same with the arguments.. look to above for more information
- NEGATE - Reverses all colors of the image.
- GRAYSCALE - Converts the image into grayscale.
- BRIGHTNESS - Changes the brightness of the image. Use farg1 to set the level of brightness. (1-200)
- CONTRAST - Changes the contrast of the image. Use arg1 to set the level of contrast.(-100 - 100)
- COLORIZE - Use farg1 , farg2 and farg3 in the form of red , blue , green and farg4 for the alpha channel. The range for each color is 0 to 255. Alpha channel, A value between 0 and 127. 0 indicates completely opaque while 127 indicates completely transparent
- EDGEDETECT - Uses edge detection to highlight the edges in the image.
- EMBOSS - Embosses the image.
- GAUSSIAN_BLUR - Blurs the image using the Gaussian method.
- SELECTIVE_BLUR - Blurs the image.
- MEAN_REMOVAL - Uses mean removal to achieve a "sketchy" effect.
- SMOOTH - Makes the image smoother. Use farg1 to set the level of smoothness(1 - 100) 1 is full weight of the smoothing where 100 you'd notice almost nothing.
- PIXELATE - Applies pixelation effect to the image, use farg1 to set the block size in pixels and farg2 whether to use advanced pixelation effect or not (defaults to FALSE), to set the pixelation effect mode.
- IMAGEHUE - This is different from COLORIZE, it's much more like Photoshop's hue function. Use farg1 , farg2 and farg3 respectively as red , blue , green. The range for each color is 0 to 255.
farg1 (optional) - First argument for the filters
farg2 (optional) - Second argument for the filters
farg3 (optional) - Third argument for the filters
farg4 (optional) - Fourth argument for the filters
percentage (optional) - Resize image in percent of original eg. 50%.
width (optional) - Resize image on width and height will resize accordingly to keep aspect ratio
height (optional) - Resize image on height and width will resize accordingly to keep aspect ratio
Assign (optional) - Assign the output (return the smarty assignment) Use in conjunction with out without URL
debugIT (optional) Default:false - Get an array of the pre and post images... the original and the resized
( true/false ) This information is required for any support
Note:
height and width (optional)
Important:You may use width in conjunction with height in order to resize image to an absolute size of your control. Aspect ratio is then, dependent on the values you use. If no parameters for resizing are passed (except for the path) then a resizing with a percentage value of 25% is performed by default
NOTE:
5.3.0 Pixelation support (PIXELATE) was added.
5.2.5 Alpha support for COLORIZE was added.
Author: jeremyBass <jeremybass@cableone.net>
Website: CorbensProducts.com
Support more mods like this:
Version: BETA 0.9, 12.22.2009
Author: jeremyBass <jeremybass@cableone.net>
Version: BETA 0.9, 12.22.2009