Public Member Functions | |
open ($fileName) | |
save ($destination=null, $newName=null) | |
display () | |
resize ($width=null, $height=null) | |
rotate ($angle) | |
crop ($top=0, $left=0, $right=0, $bottom=0) | |
watermark ($watermarkImage, $positionX=0, $positionY=0, $watermarkImageOpacity=30, $repeat=false) | |
checkDependencies () | |
getMimeType () | |
getOriginalWidth () | |
getOriginalHeight () | |
setWatermarkPosition ($position) | |
getWatermarkPosition () | |
setWatermarkWidth ($width) | |
getWatermarkWidth () | |
setWatermarkHeigth ($heigth) | |
getWatermarkHeigth () | |
keepAspectRatio ($value=null) | |
keepFrame ($value=null) | |
keepTransparency ($value=null) | |
constrainOnly ($value=null) | |
backgroundColor ($value=null) | |
Public Attributes | |
$fileName = null | |
$imageBackgroundColor = 0 | |
const | POSITION_TOP_LEFT = 'top-left' |
const | POSITION_TOP_RIGHT = 'top-right' |
const | POSITION_BOTTOM_LEFT = 'bottom-left' |
const | POSITION_BOTTOM_RIGHT = 'bottom-right' |
const | POSITION_STRETCH = 'stretch' |
const | POSITION_TILE = 'tile' |
Protected Member Functions | |
_getFileAttributes () | |
Protected Attributes | |
$_fileType = null | |
$_fileName = null | |
$_fileMimeType = null | |
$_fileSrcName = null | |
$_fileSrcPath = null | |
$_imageHandler = null | |
$_imageSrcWidth = null | |
$_imageSrcHeight = null | |
$_requiredExtensions = null | |
$_watermarkPosition = null | |
$_watermarkWidth = null | |
$_watermarkHeigth = null | |
$_keepAspectRatio | |
$_keepFrame | |
$_keepTransparency | |
$_backgroundColor | |
$_constrainOnly |
Definition at line 32 of file Abstract.php.
_getFileAttributes | ( | ) | [protected] |
Definition at line 224 of file Abstract.php.
00225 { 00226 $pathinfo = pathinfo($this->_fileName); 00227 00228 $this->_fileSrcPath = $pathinfo['dirname']; 00229 $this->_fileSrcName = $pathinfo['basename']; 00230 }
backgroundColor | ( | $ | value = null |
) |
Get/set keepBackgroundColor
array | $value |
Definition at line 208 of file Abstract.php.
00209 { 00210 if (null !== $value) { 00211 if ((!is_array($value)) || (3 !== count($value))) { 00212 return; 00213 } 00214 foreach ($value as $color) { 00215 if ((!is_integer($color)) || ($color < 0) || ($color > 255)) { 00216 return; 00217 } 00218 } 00219 } 00220 $this->_backgroundColor = $value; 00221 return $this->_backgroundColor; 00222 }
checkDependencies | ( | ) | [abstract] |
Reimplemented in Varien_Image_Adapter_Gd2.
constrainOnly | ( | $ | value = null |
) |
Get/set constrainOnly
bool | $value |
Definition at line 194 of file Abstract.php.
00195 { 00196 if (null !== $value) { 00197 $this->_constrainOnly = (bool)$value; 00198 } 00199 return $this->_constrainOnly; 00200 }
crop | ( | $ | top = 0 , |
|
$ | left = 0 , |
|||
$ | right = 0 , |
|||
$ | bottom = 0 | |||
) | [abstract] |
Reimplemented in Varien_Image_Adapter_Gd2.
display | ( | ) | [abstract] |
Reimplemented in Varien_Image_Adapter_Gd2.
getMimeType | ( | ) |
Definition at line 79 of file Abstract.php.
00080 { 00081 if( $this->_fileType ) { 00082 return $this->_fileType; 00083 } else { 00084 list($this->_imageSrcWidth, $this->_imageSrcHeight, $this->_fileType, ) = getimagesize($this->_fileName); 00085 $this->_fileMimeType = image_type_to_mime_type($this->_fileType); 00086 return $this->_fileMimeType; 00087 } 00088 }
getOriginalHeight | ( | ) |
Retrieve Original Image Height
Definition at line 106 of file Abstract.php.
00107 { 00108 $this->getMimeType(); 00109 return $this->_imageSrcHeight; 00110 }
getOriginalWidth | ( | ) |
Retrieve Original Image Width
Definition at line 95 of file Abstract.php.
00096 { 00097 $this->getMimeType(); 00098 return $this->_imageSrcWidth; 00099 }
getWatermarkHeigth | ( | ) |
getWatermarkPosition | ( | ) |
getWatermarkWidth | ( | ) |
keepAspectRatio | ( | $ | value = null |
) |
Get/set keepAspectRatio
bool | $value |
Definition at line 152 of file Abstract.php.
00153 { 00154 if (null !== $value) { 00155 $this->_keepAspectRatio = (bool)$value; 00156 } 00157 return $this->_keepAspectRatio; 00158 }
keepFrame | ( | $ | value = null |
) |
Get/set keepFrame
bool | $value |
Definition at line 166 of file Abstract.php.
00167 { 00168 if (null !== $value) { 00169 $this->_keepFrame = (bool)$value; 00170 } 00171 return $this->_keepFrame; 00172 }
keepTransparency | ( | $ | value = null |
) |
Get/set keepTransparency
bool | $value |
Definition at line 180 of file Abstract.php.
00181 { 00182 if (null !== $value) { 00183 $this->_keepTransparency = (bool)$value; 00184 } 00185 return $this->_keepTransparency; 00186 }
open | ( | $ | fileName | ) | [abstract] |
Reimplemented in Varien_Image_Adapter_Gd2.
resize | ( | $ | width = null , |
|
$ | height = null | |||
) | [abstract] |
Reimplemented in Varien_Image_Adapter_Gd2.
rotate | ( | $ | angle | ) | [abstract] |
Reimplemented in Varien_Image_Adapter_Gd2.
save | ( | $ | destination = null , |
|
$ | newName = null | |||
) | [abstract] |
Reimplemented in Varien_Image_Adapter_Gd2.
setWatermarkHeigth | ( | $ | heigth | ) |
setWatermarkPosition | ( | $ | position | ) |
setWatermarkWidth | ( | $ | width | ) |
watermark | ( | $ | watermarkImage, | |
$ | positionX = 0 , |
|||
$ | positionY = 0 , |
|||
$ | watermarkImageOpacity = 30 , |
|||
$ | repeat = false | |||
) | [abstract] |
Reimplemented in Varien_Image_Adapter_Gd2.
$_backgroundColor [protected] |
Definition at line 60 of file Abstract.php.
$_constrainOnly [protected] |
Definition at line 61 of file Abstract.php.
$_fileMimeType = null [protected] |
Definition at line 46 of file Abstract.php.
$_fileName = null [protected] |
Definition at line 45 of file Abstract.php.
$_fileSrcName = null [protected] |
Definition at line 47 of file Abstract.php.
$_fileSrcPath = null [protected] |
Definition at line 48 of file Abstract.php.
$_fileType = null [protected] |
Definition at line 44 of file Abstract.php.
$_imageHandler = null [protected] |
Definition at line 49 of file Abstract.php.
$_imageSrcHeight = null [protected] |
Definition at line 51 of file Abstract.php.
$_imageSrcWidth = null [protected] |
Definition at line 50 of file Abstract.php.
$_keepAspectRatio [protected] |
Definition at line 57 of file Abstract.php.
$_keepFrame [protected] |
Definition at line 58 of file Abstract.php.
$_keepTransparency [protected] |
Definition at line 59 of file Abstract.php.
$_requiredExtensions = null [protected] |
$_watermarkHeigth = null [protected] |
Definition at line 55 of file Abstract.php.
$_watermarkPosition = null [protected] |
Definition at line 53 of file Abstract.php.
$_watermarkWidth = null [protected] |
Definition at line 54 of file Abstract.php.
$fileName = null |
Definition at line 34 of file Abstract.php.
$imageBackgroundColor = 0 |
Definition at line 35 of file Abstract.php.
const POSITION_BOTTOM_LEFT = 'bottom-left' |
Definition at line 39 of file Abstract.php.
const POSITION_BOTTOM_RIGHT = 'bottom-right' |
Definition at line 40 of file Abstract.php.
const POSITION_STRETCH = 'stretch' |
Definition at line 41 of file Abstract.php.
const POSITION_TILE = 'tile' |
Definition at line 42 of file Abstract.php.
const POSITION_TOP_LEFT = 'top-left' |
Definition at line 37 of file Abstract.php.
const POSITION_TOP_RIGHT = 'top-right' |
Definition at line 38 of file Abstract.php.