\ExtendedImage
extended-image/code/ExtendedImage.php
Can Return the Image as Base64 String
Can set Backgroundcolor on padded resize
Synopsis
class ExtendedImage
extends DataExtension
{
- // members
- private static integer $get_jpeg_default_quality = 75;
- private static string $get_jpeg_default_background_color = "FFFFFF";
- // methods
- public string getBase64Tag()
- public void getBase64Source()
- public Array DetectFace()
- public Image_Cached|SecureImage_Cached DetectedFace()
- public string cacheDetectedFaceFilename()
- public void generateDetectedFaceImage()
- public string TagWithClass()
- public void MergeOver()
- public void MergeUnder()
- public Image_Cached getMergedImage()
- public string cacheMergedFilename()
- public void generateMergedImage()
- public void TransparentPad()
- public Image_Cached getTransparentFormattedImage()
- public string cacheTransparentFilename()
- public void generateTransparentFormattedImage()
- public GD generateTransparentPad()
- public void Blur()
- public Image_Cached getBluredImage()
- public string cacheBluredFilename()
- public void generateBluredImage()
- public void ToJPEG()
- public Image_Cached getJPEGImage()
- public string cacheToJPEGFilename()
- public void generateToJPEGImage()
Hierarchy
Extends
- DataExtension
Members
private
- $get_jpeg_default_background_color — integer
- $get_jpeg_default_quality — integer
Methods
public
- Blur() — Blur the Image
- DetectFace() — Detect a Face inside the image
- DetectedFace() — returns the image with the face marked in a red square
- MergeOver() — Merge the Image onto anotherone fitting it with a min padding
- MergeUnder() — use the current Image as a background for the merging image
- TagWithClass() — Return an XHTML img tag for this Image, or NULL if the image file doesn't exist on the filesystem.
- ToJPEG() — Generate a jpeg image from the source
- TransparentPad() — Resize this Image by both width and height with transparent Background, using padded resize. Use in templates with $transparentPad.
- cacheBluredFilename() — Return the filename for the cached image.
- cacheDetectedFaceFilename() — Return the filename for the cached image.
- cacheMergedFilename() — Return the filename for the cached image, given it's format name and arguments.
- cacheToJPEGFilename() — Return the filename for the cached image.
- cacheTransparentFilename() — Return the filename for the cached image, given it's format name and arguments.
- generateBluredImage() — Generate an image on the specified format. It will save the image at the location specified by cacheFilename(). The image will be generated using the specific 'generate' method for the specified format.
- generateDetectedFaceImage() — Generate an image on the specified format. It will save the image at the location specified by cacheFilename(). The image will be generated using the specific 'generate' method for the specified format.
- generateMergedImage() — genereate the merged image
- generateToJPEGImage() — Generate an image on the specified format. It will save the image at the location specified by cacheFilename(). The image will be generated using the specific 'generate' method for the specified format.
- generateTransparentFormattedImage() — Generate an image on the specified format. It will save the image at the location specified by cacheFilename(). The image will be generated using the specific 'generate' method for the specified format.
- generateTransparentPad() — Resize this Image by both width and height, using padded resize. Use in templates with $SetSize.
- getBase64Source() — retrun the Base64 Notation of the Image
- getBase64Tag() — Return an XHTML img tag for this Image.
- getBluredImage() — Return an image object representing the blured image.
- getJPEGImage() — Return an image object representing the blured image.
- getMergedImage() — Return an image object representing the merged image.
- getTransparentFormattedImage() — Return an image object representing the image in the given format.