Inheritance diagram for oxUtilsPic:
Collaboration diagram for oxUtilsPic:Public Member Functions | |
| resizeImage ($sSrc, $sTarget, $iDesiredWidth, $iDesiredHeight) | |
| safePictureDelete ($sPicName, $sAbsDynImageDir, $sTable, $sField) | |
| overwritePic ($oObject, $sPicTable, $sPicField, $sPicType, $sPicDir, $aParams, $sAbsDynImageDir) | |
Static Public Member Functions | |
| static | getInstance () |
Protected Member Functions | |
| _deletePicture ($sPicName, $sAbsDynImageDir) | |
| _isPicDeletable ($sPicName, $sTable, $sField) | |
| _resizeGif ($sSrc, $sTarget, $iNewWidth, $iNewHeight, $iOriginalWidth, $iOriginalHeigth, $iGDVer, $blDisableTouch) | |
| _resize ($aImageInfo, $sSrc, $hDestinationImage, $sTarget, $iNewWidth, $iNewHeight, $iGdVer, $blDisableTouch, $iDefQuality) | |
| _copyAlteredImage ($sDestinationImage, $sSourceImage, $iNewWidth, $iNewHeight, $aImageInfo, $sTarget, $iGdVer, $blDisableTouch) | |
Protected Attributes | |
| $_aImageTypes = array("GIF" => IMAGETYPE_GIF, "JPG" => IMAGETYPE_JPEG, "PNG" => IMAGETYPE_PNG, "JPEG" => IMAGETYPE_JPEG) | |
Static Private Attributes | |
| static | $_instance = null |
Including pictures generator functions file Image manipulation class
Definition at line 11 of file oxutilspic.php.
| oxUtilsPic._copyAlteredImage | ( | $ | sDestinationImage, | |
| $ | sSourceImage, | |||
| $ | iNewWidth, | |||
| $ | iNewHeight, | |||
| $ | aImageInfo, | |||
| $ | sTarget, | |||
| $ | iGdVer, | |||
| $ | blDisableTouch | |||
| ) | [protected] |
create and copy the resized image
| string | $sDestinationImage file + path of destination | |
| string | $sSourceImage file + path of source | |
| int | $iNewWidth new width of the image | |
| int | $iNewHeight new height of the image | |
| array | $aImageInfo additional info | |
| string | $sTarget target file path | |
| int | $iGdVer used gd version | |
| bool | $blDisableTouch wether Touch() should be called or not |
Definition at line 260 of file oxutilspic.php.
| oxUtilsPic._deletePicture | ( | $ | sPicName, | |
| $ | sAbsDynImageDir | |||
| ) | [protected] |
Removes picture file from disk.
| string | $sPicName name of picture | |
| string | $sAbsDynImageDir the absolute image diectory, where to delete the given image ($myConfig->getPictureDir(false)) |
Definition at line 105 of file oxutilspic.php.
| oxUtilsPic._isPicDeletable | ( | $ | sPicName, | |
| $ | sTable, | |||
| $ | sField | |||
| ) | [protected] |
Checks if current picture file is used in more than one table entry, returns true if one, false if more than one.
| string | $sPicName Name of picture file | |
| string | $sTable in which table | |
| string | $sField table field value |
Definition at line 144 of file oxutilspic.php.
| oxUtilsPic._resize | ( | $ | aImageInfo, | |
| $ | sSrc, | |||
| $ | hDestinationImage, | |||
| $ | sTarget, | |||
| $ | iNewWidth, | |||
| $ | iNewHeight, | |||
| $ | iGdVer, | |||
| $ | blDisableTouch, | |||
| $ | iDefQuality | |||
| ) | [protected] |
type dependant image resizing
| array | $aImageInfo Contains information on image's type / width / height | |
| string | $sSrc source image | |
| string | $hDestinationImage Destination Image | |
| string | $sTarget Resized Image target | |
| int | $iNewWidth Resized Image's width | |
| int | $iNewHeight Resized Image's height | |
| mixed | $iGdVer used GDVersion, if null or false returns false | |
| bool | $blDisableTouch false if "touch()" should be called for gif resizing | |
| string | $iDefQuality quality for "imagejpeg" function |
Definition at line 216 of file oxutilspic.php.
| oxUtilsPic._resizeGif | ( | $ | sSrc, | |
| $ | sTarget, | |||
| $ | iNewWidth, | |||
| $ | iNewHeight, | |||
| $ | iOriginalWidth, | |||
| $ | iOriginalHeigth, | |||
| $ | iGDVer, | |||
| $ | blDisableTouch | |||
| ) | [protected] |
Resizes and saves GIF image. This method was separated due to GIF transparency problems.
| string | $sSrc image file | |
| string | $sTarget destination file | |
| int | $iNewWidth new width | |
| int | $iNewHeight new height | |
| int | $iOriginalWidth original width | |
| int | $iOriginalHeigth original height | |
| int | $iGDVer GD packet version | |
| bool | $blDisableTouch false if "touch()" should be called |
Definition at line 196 of file oxutilspic.php.
| static oxUtilsPic.getInstance | ( | ) | [static] |
| oxUtilsPic.overwritePic | ( | $ | oObject, | |
| $ | sPicTable, | |||
| $ | sPicField, | |||
| $ | sPicType, | |||
| $ | sPicDir, | |||
| $ | aParams, | |||
| $ | sAbsDynImageDir | |||
| ) |
Deletes picture if new is uploaded or changed
| object | $oObject in whitch obejct search for old values | |
| string | $sPicTable pictures table | |
| string | $sPicField where picture are stored | |
| string | $sPicType how does it call in $_FILE array | |
| string | $sPicDir directory of pic | |
| array | $aParams new input text array | |
| string | $sAbsDynImageDir the absolute image diectory, where to delete the given image ($myConfig->getPictureDir(false)) |
Definition at line 168 of file oxutilspic.php.
| oxUtilsPic.resizeImage | ( | $ | sSrc, | |
| $ | sTarget, | |||
| $ | iDesiredWidth, | |||
| $ | iDesiredHeight | |||
| ) |
Resizes image to desired width and height, returns true on success.
| string | $sSrc Source of image file | |
| string | $sTarget Target to write resized image file | |
| mixed | $iDesiredWidth Width of resized image | |
| mixed | $iDesiredHeight Height of resized image |
Definition at line 62 of file oxutilspic.php.
| oxUtilsPic.safePictureDelete | ( | $ | sPicName, | |
| $ | sAbsDynImageDir, | |||
| $ | sTable, | |||
| $ | sField | |||
| ) |
deletes the given picutre and checks before if the picture is deletable
| string | $sPicName Name of picture file | |
| string | $sAbsDynImageDir the absolute image diectory, where to delete the given image ($myConfig->getPictureDir(false)) | |
| string | $sTable in which table | |
| string | $sField table field value |
Definition at line 88 of file oxutilspic.php.
oxUtilsPic.$_aImageTypes = array("GIF" => IMAGETYPE_GIF, "JPG" => IMAGETYPE_JPEG, "PNG" => IMAGETYPE_PNG, "JPEG" => IMAGETYPE_JPEG) [protected] |
Definition at line 18 of file oxutilspic.php.
oxUtilsPic.$_instance = null [static, private] |
Definition at line 25 of file oxutilspic.php.
1.7.1