PNG
extends Image
in package
PNG representation of a medium.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Medium Constructor.
- __destruct() : mixed
- colorAllocate() : RGBColor
- Allocate a color for an image.
- getColorAt() : RGBColor
- Returns the index of the color of a pixel.
- getHeight() : int
- Returns the heigth in bytes of the medium.
- getMimetype() : string
- getPath() : string
- Returns the path of the medium.
- getType() : int
- getWidth() : int
- Returns the width in bytes of the medium.
- saveToPath() : void
- Saves the medium to the specified path.
- setPixel() : void
- Sets a single pixel.
- createImage() : GdImage
- getImage() : GdImage
- loadImageInfo() : void
Properties
$height
private
int
$height
$img
private
GdImage
$img
$mimeType
private
string
$mimeType
$path
private
string
$path
$type
private
int
$type
$width
private
int
$width
Methods
__construct()
Medium Constructor.
public
__construct(string $path) : mixed
Parameters
- $path : string
-
The path to the medium.
__destruct()
public
__destruct() : mixed
colorAllocate()
Allocate a color for an image.
public
colorAllocate(RGBColor $color) : RGBColor
Parameters
- $color : RGBColor
Return values
RGBColor —the color.
getColorAt()
Returns the index of the color of a pixel.
public
getColorAt(Pixel $pixel) : RGBColor
Parameters
- $pixel : Pixel
-
The pixel.
Return values
RGBColor —The color.
getHeight()
Returns the heigth in bytes of the medium.
public
getHeight() : int
Return values
int —The heigth.
getMimetype()
public
getMimetype() : string
Return values
stringgetPath()
Returns the path of the medium.
public
getPath() : string
Return values
string —The path.
getType()
public
getType() : int
Return values
intgetWidth()
Returns the width in bytes of the medium.
public
getWidth() : int
Return values
int —The width.
saveToPath()
Saves the medium to the specified path.
public
saveToPath(string $path) : void
Parameters
- $path : string
-
The path.
setPixel()
Sets a single pixel.
public
setPixel(Pixel $pixel, RGBColor $color) : void
Parameters
createImage()
protected
createImage() : GdImage
Return values
GdImagegetImage()
protected
getImage() : GdImage
Return values
GdImageloadImageInfo()
private
loadImageInfo() : void