MARIJuANA
— DIOS — NO — CREA — NADA — EN — VANO —
Linux instance-20230208-1745 6.8.0-1013-oracle #13~22.04.1-Ubuntu SMP Mon Sep 2 13:02:56 UTC 2024 x86_64
  SOFT : Apache/2.4.52 (Ubuntu) PHP : 8.1.2-1ubuntu2.19
/var/www/pocoes/transparencia/assets/filemanager/connectors/php/inc/wideimage/doc/WideImage/
10.0.0.135

 
[ NAME ] [ SIZE ] [ PERM ] [ DATE ] [ ACT ]
+FILE +DIR
WideImage.html 27.52 KB -rw-rw-r-- 2019-05-20 12:22 R E G D
WideImage_Canvas.html 17.379 KB -rw-rw-r-- 2019-05-20 12:22 R E G D
WideImage_Font_GDF.html 7.99 KB -rw-rw-r-- 2019-05-20 12:22 R E G D
WideImage_Font_PS.html 9.649 KB -rw-rw-r-- 2019-05-20 12:22 R E G D
WideImage_Font_TTF.html 9.154 KB -rw-rw-r-- 2019-05-20 12:22 R E G D
WideImage_Image.html 102.277 KB -rw-rw-r-- 2019-05-20 12:22 R E G D
WideImage_PaletteImage.html 24.658 KB -rw-rw-r-- 2019-05-20 12:22 R E G D
WideImage_TrueColorImage.html 31.742 KB -rw-rw-r-- 2019-05-20 12:22 R E G D
_Canvas.php.html 4.367 KB -rw-rw-r-- 2019-05-20 12:22 R E G D
_Exception.php.html 4.046 KB -rw-rw-r-- 2019-05-20 12:22 R E G D
_Font---GDF.php.html 4.032 KB -rw-rw-r-- 2019-05-20 12:22 R E G D
_Font---PS.php.html 4.026 KB -rw-rw-r-- 2019-05-20 12:22 R E G D
_Font---TTF.php.html 4.032 KB -rw-rw-r-- 2019-05-20 12:22 R E G D
_Image.php.html 4.424 KB -rw-rw-r-- 2019-05-20 12:22 R E G D
_MapperFactory.php.html 4.224 KB -rw-rw-r-- 2019-05-20 12:22 R E G D
_PaletteImage.php.html 4.04 KB -rw-rw-r-- 2019-05-20 12:22 R E G D
_TrueColorImage.php.html 4.084 KB -rw-rw-r-- 2019-05-20 12:22 R E G D
_WideImage.php.html 5.721 KB -rw-rw-r-- 2019-05-20 12:22 R E G D
REQUEST EXIT
Docs For Class WideImage_Image
WideImage
[ class tree: WideImage ] [ index: WideImage ] [ all elements ]

Class: WideImage_Image

Source Location: /Image.php

Class Overview


Base class for images


Author(s):

Variables

Methods


Child classes:

WideImage_PaletteImage
WideImage_TrueColorImage
A class for truecolor image objects

Class Details

[line 44]
Base class for images



Tags:

abstract:  


[ Top ]


Class Variables

$canvas =  null

[line 62]

Canvas object



Tags:

access:  protected

Type:   WideImage_Canvas


[ Top ]

$handle =  null

[line 50]

Holds the image resource



Tags:

access:  protected

Type:   resource


[ Top ]

$handleReleased =  false

[line 56]

Flag that determines if WideImage should call imagedestroy() upon object destruction



Tags:

access:  protected

Type:   bool


[ Top ]

$sdata =  null

[line 67]



Tags:

access:  protected

Type:   string


[ Top ]



Class Methods


constructor __construct [line 74]

WideImage_Image __construct( resource $handle)

The base class constructor



Overridden in child classes as:

WideImage_TrueColorImage::__construct()
Creates the object

Parameters:

resource   $handle   Image handle (GD2 resource)

[ Top ]

destructor __destruct [line 85]

void __destruct( )

Cleanup

Destroys the handle via WideImage_Image::destroy() when called by the GC.




[ Top ]

method addNoise [line 813]

WideImage_Image addNoise( int $amount, string $type)

Adds noise to the image



Tags:

return:  Image with noise added
author:  Tomasz Kapusta


Parameters:

int   $amount   Number of noise pixels to add
string   $type   Type of noise 'salt&pepper', 'color' or 'mono'

[ Top ]

method allocateColor [line 248]

int allocateColor( mixed $R, [int $G = null], [int $B = null])

Allocate a color by RGB values.



Tags:

return:  Image color index


Parameters:

mixed   $R   Red-component value or an RGB array (with red, green, blue keys)
int   $G   If $R is int, this is the green component
int   $B   If $R is int, this is the blue component

[ Top ]

method applyConvolution [line 677]

WideImage_Image applyConvolution( array $matrix, float $div, float $offset)

Applies convolution matrix with imageconvolution()



Parameters:

array   $matrix  
float   $div  
float   $offset  

[ Top ]

method applyFilter [line 664]

WideImage_Image applyFilter( int $filter, [int $arg1 = null], [int $arg2 = null], [int $arg3 = null], [int $arg4 = null])

Applies a filter



Parameters:

int   $filter   One of the IMG_FILTER_* constants
int   $arg1  
int   $arg2  
int   $arg3  
int   $arg4  

[ Top ]

method applyMask [line 649]

WideImage_Image applyMask( WideImage_Image $mask, [mixed $left = 0], [mixed $top = 0])

Returns an image with applied mask

A mask is a grayscale image, where the shade determines the alpha channel. Black is fully transparent and white is fully opaque.




Tags:

return:  The resulting image


Parameters:

WideImage_Image   $mask   The mask image, greyscale
mixed   $left   Left coordinate, smart coordinate
mixed   $top   Top coordinate, smart coordinate

[ Top ]

method asGrayscale [line 754]

WideImage_Image asGrayscale( )

Returns a grayscale copy of the image



Tags:

return:  grayscale copy


[ Top ]

method asNegative [line 744]

WideImage_Image asNegative( )

Returns a negative of the image

This operation differs from calling WideImage_Image::applyFilter(IMG_FILTER_NEGATIVE), because it's 8-bit and transparency safe. This means it will return an 8-bit image, if the source image is 8-bit. If that 8-bit image has a palette transparency, the resulting image will keep transparency.




Tags:

return:  negative of the image


[ Top ]

method asPalette [line 919]

WideImage_Image asPalette( [int $nColors = 255], [bool $dither = null], [bool $matchPalette = true])

Returns a palette copy (8bit) of the image



Tags:

abstract:  


Overridden in child classes as:

WideImage_PaletteImage::asPalette()
(non-PHPdoc)
WideImage_TrueColorImage::asPalette()

Parameters:

int   $nColors   Number of colors in the resulting image, more than 0, less or equal to 255
bool   $dither   Use dithering or not
bool   $matchPalette   Set to true to use imagecolormatch() to match the resulting palette more closely to the original image

[ Top ]

method asString [line 175]

string asString( string $format)

Returns binary string with image data in format specified by $format

Additional parameters may be passed to the function. See WideImage_Image::saveToFile() for more details.




Tags:

return:  The binary image data in specified format


Parameters:

string   $format   The format of the image

[ Top ]

method asTrueColor [line 909]

WideImage_TrueColorImage asTrueColor( )

Returns a true-color copy of the image



Tags:

abstract:  


Overridden in child classes as:

WideImage_PaletteImage::asTrueColor()
(non-PHPdoc)
WideImage_TrueColorImage::asTrueColor()
(non-PHPdoc)

[ Top ]

method autoCrop [line 730]

WideImage_Image autoCrop( [int $margin = 0], [int $rgb_threshold = 0], [int $pixel_cutoff = 1], [int $base_color = null])

Performs an auto-crop on the image

The image is auto-cropped from each of four sides. All sides are scanned for pixels that differ from $base_color for more than $rgb_threshold in absolute RGB difference. If more than $pixel_cutoff differentiating pixels are found, that line is considered to be the crop line for the side. If the line isn't different enough, the algorithm procedes to the next line towards the other edge of the image.

When the crop rectangle is found, it's enlarged by the $margin value on each of the four sides.




Tags:

return:  The cropped image


Parameters:

int   $margin   Margin for the crop rectangle, can be negative.
int   $rgb_threshold   RGB difference which still counts as "same color".
int   $pixel_cutoff   How many pixels need to be different to mark a cut line.
int   $base_color   The base color index. If none specified (or null given), left-top pixel is used.

[ Top ]

method copy [line 850]

WideImage_Image copy( )

Returns a copy of the image object



Tags:

return:  The copy


[ Top ]

method copyNoAlpha [line 940]

WideImage_Image copyNoAlpha( )

Returns an image without an alpha channel



Tags:

abstract:  


Overridden in child classes as:

WideImage_PaletteImage::copyNoAlpha()
(non-PHPdoc)
WideImage_TrueColorImage::copyNoAlpha()
(non-PHPdoc)

[ Top ]

method copyTo [line 865]

void copyTo( WideImage_Image $dest, [int $left = 0], [int $top = 0])

Copies this image onto another image



Parameters:

WideImage_Image   $dest  
int   $left  
int   $top  

[ Top ]

method copyTransparencyFrom [line 401]

void copyTransparencyFrom( object $sourceImage, [bool $fill = true])

Copies transparency information from $sourceImage. Optionally fills the image with the transparent color at (0, 0).



Parameters:

object   $sourceImage  
bool   $fill   True if you want to fill the image with transparent color

[ Top ]

method correctGamma [line 799]

WideImage_Image correctGamma( float $inputGamma, float $outputGamma)

Corrects gamma on the image



Tags:

return:  Image with corrected gamma


Parameters:

float   $inputGamma  
float   $outputGamma  

[ Top ]

method crop [line 707]

WideImage_Image crop( [mixed $left = 0], [mixed $top = 0], [mixed $width = '100%'], [mixed $height = '100%'])

Returns a cropped rectangular portion of the image

If the rectangle specifies area that is out of bounds, it's limited to the current image bounds.

Examples:

  1.  $cropped $img->crop(1010150200)// crops a 150x200 rect at (10, 10)
  2.  $cropped $img->crop(-100-5010050)// crops a 100x50 rect at the right-bottom of the image
  3.  $cropped $img->crop('25%''25%''50%''50%')// crops a 50%x50% rect from the center of the image

This operation supports alignment notation in left/top coordinates. Example:

  1.  $cropped $img->crop("right""bottom"100200)// crops a 100x200 rect from right bottom
  2.  $cropped $img->crop("center""middle"5030)// crops a 50x30 from the center of the image




Tags:

return:  The cropped image


Parameters:

mixed   $left   Left-coordinate of the crop rect, smart coordinate
mixed   $top   Top-coordinate of the crop rect, smart coordinate
mixed   $width   Width of the crop rect, smart coordinate
mixed   $height   Height of the crop rect, smart coordinate

[ Top ]

method destroy [line 96]

void destroy( )

This method destroy the image handle, and releases the image resource.

After this is called, the object doesn't hold a valid image any more. No operation should be called after that.




[ Top ]

method fill [line 430]

void fill( int $x, int $y, int $color)

Fill the image at ($x, $y) with color index $color



Parameters:

int   $x  
int   $y  
int   $color  

[ Top ]

method flip [line 787]

WideImage_Image flip( )

Returns a flipped (mirrored over horizontal line) copy of the image



Tags:

return:  Flipped copy


[ Top ]

method getCanvas [line 890]

WideImage_Canvas getCanvas( )

Returns the canvas object

The Canvas object can be used to draw text and shapes on the image

Examples:

  1.  $img WideImage::load('pic.jpg);
  2.  $canvas = $img->getCanvas();
  3.  $canvas->useFont('arial.ttf', 15, $img->allocateColor(200, 220, 255));
  4.  $canvas->writeText(10, 50, "Hello world!");
  5.  
  6.  $canvas->filledRectangle(10, 10, 80, 40, $img->allocateColor(255, 127, 255));
  7.  $canvas->line(60, 80, 30, 100, $img->allocateColor(255, 0, 0));
  8.  $img->saveToFile('new.png');




Tags:

return:  The Canvas object


[ Top ]

method getChannels [line 933]

WideImage_Image getChannels( )

Retrieve an image with selected channels

Examples:

  1.  $channels $img->getChannels('red''blue');
  2.  $channels $img->getChannels('alpha''green');
  3.  $channels $img->getChannels(array('green''blue'));




Tags:

abstract:  


Overridden in child classes as:

WideImage_PaletteImage::getChannels()
(non-PHPdoc)
WideImage_TrueColorImage::getChannels()

[ Top ]

method getClosestColor [line 369]

int getClosestColor( mixed $R, [int $G = null], [int $B = null])

Returns closest color index that matches the given RGB value. Uses PHP's imagecolorclosest()



Tags:

return:  Color index


Parameters:

mixed   $R   Red or RGBA array
int   $G   Green component (or null if $R is an RGB array)
int   $B   Blue component (or null if $R is an RGB array)

[ Top ]

method getColorAt [line 343]

int getColorAt( int $x, int $y)

Returns an index of the color at $x, $y



Tags:

return:  Color index for a pixel at $x, $y


Parameters:

int   $x  
int   $y  

[ Top ]

method getColorRGB [line 331]

mixed getColorRGB( int $colorIndex)

Returns a color's RGB



Tags:

return:  RGBA array for a color with index $colorIndex


Parameters:

int   $colorIndex   Color index

[ Top ]

method getExactColor [line 386]

int getExactColor( mixed $R, [int $G = null], [int $B = null])

Returns the color index that exactly matches the given RGB value. Uses PHP's imagecolorexact()



Tags:

return:  Color index


Parameters:

mixed   $R   Red or RGBA array
int   $G   Green component (or null if $R is an RGB array)
int   $B   Blue component (or null if $R is an RGB array)

[ Top ]

method getHandle [line 109]

resource getHandle( )

Returns the GD image resource



Tags:

return:  GD image resource


[ Top ]

method getHeight [line 235]

int getHeight( )



Tags:

return:  Image height


[ Top ]

method getMask [line 457]

WideImage_Image getMask( )

Returns the image's mask

Mask is a greyscale image where the shade defines the alpha channel (black = transparent, white = opaque).

For opaque images (JPEG), the result will be white. For images with single-color transparency (GIF, 8-bit PNG), the areas with the transparent color will be black. For images with alpha channel transparenct, the result will be alpha channel.




Tags:

return:  An image mask


[ Top ]

method getOperation [line 441]

object getOperation( string $name)

Used internally to create Operation objects



Tags:

access:  protected


Parameters:

string   $name  

[ Top ]

method getRGBAt [line 305]

array getRGBAt( int $x, int $y)

Returns a RGBA array for pixel at $x, $y



Tags:

return:  RGB array


Parameters:

int   $x  
int   $y  

[ Top ]

method getTransparentColor [line 267]

int getTransparentColor( )



Tags:

return:  Transparent color index


[ Top ]

method getTransparentColorRGB [line 287]

mixed getTransparentColorRGB( )

Returns a RGB array of the transparent color or null if none.



Tags:

return:  Transparent color RGBA array


[ Top ]

method getWidth [line 227]

int getWidth( )



Tags:

return:  Image width


[ Top ]

method isTransparent [line 259]

bool isTransparent( )



Tags:

return:  True if the image is transparent, false otherwise


[ Top ]

method isTrueColor [line 902]

bool isTrueColor( )

Returns true if the image is true-color, false otherwise



Tags:

abstract:  


Overridden in child classes as:

WideImage_PaletteImage::isTrueC