Docs For Class WideImage_PaletteImage

WideImage

# Class: WideImage_PaletteImage Source Location: /PaletteImage.php
### Class Overview
    WideImage_Image
       |
       --WideImage_PaletteImage
| ### Methods asPalette asTrueColor copyAsNew copyNoAlpha create doCreate getChannels isTrueColor
### Inherited Variables #### Class: WideImage_Image WideImage_Image::$canvas WideImage_Image::$handle WideImage_Image::$handleReleased WideImage_Image::$sdata | ### Inherited Methods #### Class: WideImage_Image WideImage_Image::__construct() The base class constructor WideImage_Image::addNoise() Adds noise to the image WideImage_Image::allocateColor() Allocate a color by RGB values. WideImage_Image::applyConvolution() Applies convolution matrix with imageconvolution() WideImage_Image::applyFilter() Applies a filter WideImage_Image::applyMask() Returns an image with applied mask WideImage_Image::asGrayscale() Returns a grayscale copy of the image WideImage_Image::asNegative() Returns a negative of the image WideImage_Image::asPalette() Returns a palette copy (8bit) of the image WideImage_Image::asString() Returns binary string with image data in format specified by $format WideImage_Image::asTrueColor() Returns a true-color copy of the image WideImage_Image::autoCrop() Performs an auto-crop on the image WideImage_Image::copy() Returns a copy of the image object WideImage_Image::copyNoAlpha() Returns an image without an alpha channel WideImage_Image::copyTo() Copies this image onto another image WideImage_Image::copyTransparencyFrom() Copies transparency information from $sourceImage. Optionally fills the image with the transparent color at (0, 0). WideImage_Image::correctGamma() Corrects gamma on the image WideImage_Image::crop() Returns a cropped rectangular portion of the image WideImage_Image::destroy() This method destroy the image handle, and releases the image resource. WideImage_Image::fill() Fill the image at ($x, $y) with color index $color WideImage_Image::flip() Returns a flipped (mirrored over horizontal line) copy of the image WideImage_Image::getCanvas() Returns the canvas object WideImage_Image::getChannels() Retrieve an image with selected channels WideImage_Image::getClosestColor() Returns closest color index that matches the given RGB value. Uses PHP's imagecolorclosest() WideImage_Image::getColorAt() Returns an index of the color at $x, $y WideImage_Image::getColorRGB() Returns a color's RGB WideImage_Image::getExactColor() Returns the color index that exactly matches the given RGB value. Uses PHP's imagecolorexact() WideImage_Image::getHandle() Returns the GD image resource WideImage_Image::getHeight() WideImage_Image::getMask() Returns the image's mask WideImage_Image::getOperation() Used internally to create Operation objects WideImage_Image::getRGBAt() Returns a RGBA array for pixel at $x, $y WideImage_Image::getTransparentColor() WideImage_Image::getTransparentColorRGB() Returns a RGB array of the transparent color or null if none. WideImage_Image::getWidth() WideImage_Image::isTransparent() WideImage_Image::isTrueColor() Returns true if the image is true-color, false otherwise WideImage_Image::isValid() WideImage_Image::merge() This method lays the overlay (watermark) on the image. WideImage_Image::mirror() Returns a mirrored copy of the image WideImage_Image::output() Outputs the image to browser WideImage_Image::releaseHandle() Releases the handle WideImage_Image::resize() Resize the image to given dimensions. WideImage_Image::resizeCanvas() Resizes the canvas of the image, but doesn't scale the content of the image WideImage_Image::resizeDown() Same as WideImage_Image::resize(), but the image is only applied if it is larger then the given dimensions. WideImage_Image::resizeUp() Same as WideImage_Image::resize(), but the image is only applied if it is smaller then the given dimensions. WideImage_Image::rotate() Rotate the image for angle $angle clockwise. WideImage_Image::roundCorners() Returns an image with round corners WideImage_Image::saveToFile() Saves an image to a file WideImage_Image::setColorAt() Set the color index $color to a pixel at $x, $y WideImage_Image::setRGBAt() Writes a pixel at the designated coordinates WideImage_Image::setTransparentColor() Sets the current transparent color index. Only makes sense for palette images (8-bit). WideImage_Image::unsharp() Applies the unsharp filter WideImage_Image::writeHeader() Output a header to browser. WideImage_Image::__call() Used internally to execute operations WideImage_Image::__destruct() Cleanup WideImage_Image::__sleep() Returns an array of serializable protected variables. Called automatically upon serialize(). WideImage_Image::__toString() Returns an image in GIF or PNG format WideImage_Image::__wakeup() Restores an image from serialization. Called automatically upon unserialize().
### Class Details [line 28] [ Top ] ### Class Methods ### static method create [line 37]
`static WideImage_PaletteImage create( int $width, int $height)`
Create a palette image #### Parameters:
int | $width |
int | $height |
[ Top ] ### method asPalette [line 63]
`void asPalette( [ $nColors = 255], [ $dither = null], [ $matchPalette = true])`
(non-PHPdoc) #### Tags:
see: | asPalette($nColors, $dither, $matchPalette)
Overrides WideImage_Image::asPalette() (Returns a palette copy (8bit) of the image) #### Parameters:
| $nColors |
| $dither |
| $matchPalette |
[ Top ] ### method asTrueColor [line 104]
`void asTrueColor( )`
(non-PHPdoc) #### Tags:
see: | asTrueColor()
Overrides WideImage_Image::asTrueColor() (Returns a true-color copy of the image) [ Top ] ### method copyAsNew [line 74]
`WideImage_Image copyAsNew( [$trueColor $trueColor = false])`
Returns a copy of the image #### Tags:
access: | protected
#### Parameters:
$trueColor | $trueColor | True if the new image should be truecolor
[ Top ] ### method copyNoAlpha [line 132]
`void copyNoAlpha( )`
(non-PHPdoc) #### Tags:
see: | copyNoAlpha()
Overrides WideImage_Image::copyNoAlpha() (Returns an image without an alpha channel) [ Top ] ### method doCreate [line 45]
`void doCreate( $width, $height)`
#### Parameters:
| $width |
| $height |
[ Top ] ### method getChannels [line 120]
`void getChannels( )`
(non-PHPdoc) #### Tags:
see: | getChannels()
Overrides WideImage_Image::getChannels() (Retrieve an image with selected channels) [ Top ] ### method isTrueColor [line 54]
`void isTrueColor( )`
(non-PHPdoc) #### Tags:
see: | isTrueColor()
Overrides WideImage_Image::isTrueColor() (Returns true if the image is true-color, false otherwise) [ Top ] Documentation generated on Sat, 19 Feb 2011 12:55:42 +0100 by phpDocumentor 1.4.3