Class: Image_Transform
Source Location: /Image_Transform-0.9.5/Image/Transform.php
Base class with factory method for backend driver
Author(s):
Version:
- Release: @package_version@
Copyright:
|
|
|
Child classes:
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Method Detail
addBorder [line 1178]
addDropShadow [line 1172]
addText [line 1166]
canvasResize [line 1201]
colorarray2colorhex [line 1115]
mixed colorarray2colorhex(
array
$color)
|
|
Converts an array of RGB value into a #FFFFFF format color.
Parameters:
colorhex2colorarray [line 1086]
array colorhex2colorarray(
string
$colorhex)
|
|
Converts a color string into an array of RGB values
Parameters:
crop [line 1195]
display [line 1021]
factory [line 201]
object an &factory(
[string
$driver = ''])
|
|
Creates a new Image_Transform object
Parameters:
fit [line 474]
bool|PEAR_Error fit(
integer
$width, integer
$height)
|
|
Fits the image in the specified box size If the image is bigger than the box specified by $width and $height, it will be scaled down to fit inside of it. If the image is smaller, nothing is done.
Parameters:
fitOnCanvas [line 501]
unknown fitOnCanvas(
unknown_type
$width, unknown_type
$height, [unknown_type
$posn = 'center'])
|
|
This works as per fit, but creates the canvas of size $width x $height and positions the resized image on it, by default in the centre.
Parameters:
fitX [line 519]
bool|PEAR_Error fitX(
integer
$width)
|
|
Fits the image in the specified width If the image is wider than the width specified by $width, it will be scaled down to fit inside of it. If the image is smaller, nothing is done.
Parameters:
fitY [line 536]
bool|PEAR_Error fitY(
integer
$height)
|
|
Fits the image in the specified height If the image is taller than the height specified by $height, it will be scaled down to fit inside of it. If the image is smaller, nothing is done.
Parameters:
flip [line 1256]
free [line 1069]
gamma [line 1215]
getHandle [line 818]
getImageHeight [line 904]
getImageSize [line 916]
Returns the image size and extra format information
getImageType [line 830]
Returns the type of the image being manipulated
getImageWidth [line 893]
getMimeType [line 845]
string getMimeType(
[string
$type = null])
|
|
Returns the MIME type of the image being manipulated
Parameters:
getNewImageHeight [line 878]
Return new image Y This function will retrieve the new image 'Y' and return it's value if it's set.
getNewImageWidth [line 859]
Returns the new image width This function returns the width of the new image.
getTempDir [line 1132]
Returns the temp directory according to either the TMP, TMPDIR, or TEMP env variables. If these are not set it will also check for the existence of /tmp, %WINDIR%\temp
getTempFile [line 1146]
string getTempFile(
[string
$dirname = null])
|
|
Returns a temporary filename using tempnam() and the above getTmpDir() function.
Parameters:
getWebSafeFormat [line 935]
string getWebSafeFormat(
)
|
|
This looks at the current image type and attempts to determine which web-safe format will be most suited. It does not work brilliantly with *.png images, because it is very difficult to know whether they are 8-bit or greater. Guess I need to have fatter code here :-)
grayscale [line 1280]
Converts an image into greyscale colors
greyscale [line 1268]
intersects [line 1341]
bool|PEAR_Error intersects(
int
$width, int
$height, int
$x, int
$y)
|
|
Checks if the rectangle passed intersects with the current image
Parameters:
isError [line 279]
mixed &isError(
[object
$error = null])
|
|
Returns/sets an error when the instance couldn't initialize properly
Parameters:
keepSettingsOnSave [line 1156]
void keepSettingsOnSave(
$bool)
|
|
Parameters:
load [line 1003]
mirror [line 1243]
normalize [line 986]
Normalizes the colors, gamma and other properties of an image (this should give a result equivalent to a Photoshop autolevels)
resize [line 299]
mixed resize(
[mixed
$new_x = 0], [mixed
$new_y = 0], [array
$options = null])
|
|
Resizes the image in the X and/or Y direction(s) If either is 0 it will keep the original size for that dimension
Parameters:
rotate [line 1230]
save [line 1054]
scale [line 374]
mixed scale(
mixed
$size)
|
|
Scales an image by a percentage, factor or a given length This method preserves the aspect ratio
Parameters:
scaleByFactor [line 410]
mixed scaleByFactor(
float
$size)
|
|
Scales an image to a factor of its original size. For example, if my image was 640x480 and I called scaleByFactor(0.5) then the image would be resized to 320x240.
Parameters:
scaleByLength [line 456]
mixed scaleByLength(
int
$size)
|
|
Alias for scaleMaxLength
Parameters:
scaleByPercentage [line 395]
mixed scaleByPercentage(
int
$size)
|
|
Scales an image to a percentage of its original size. For example, if my image was 640x480 and I called scaleByPercentage(10) then the image would be resized to 64x48
Parameters:
scaleByX [line 323]
mixed scaleByX(
int
$new_x)
|
|
Scales the image to the specified width This method preserves the aspect ratio
Parameters:
scaleByXY [line 338]
void scaleByXY(
[
$new_x = 0], [
$new_y = 0], [
$options = null])
|
|
Alias for resize()
Parameters:
scaleByY [line 353]
mixed scaleByY(
int
$new_y)
|
|
Scales the image to the specified height. This method preserves the aspect ratio
Parameters:
scaleMaxLength [line 431]
mixed scaleMaxLength(
int
$size)
|
|
Scales an image so that the longest side has the specified dimension. This method preserves the aspect ratio
Parameters:
setOption [line 551]
void setOption(
string
$name, mixed
$value)
|
|
Sets one options
Parameters:
setOptions [line 568]
void setOptions(
array
$options)
|
|
Sets multiple options at once Associative array of options: - quality (Integer: 0: poor - 100: best)
- scaleMethod ('smooth', 'pixel')
Parameters:
supportsType [line 1036]
TRUE supportsType(
string
$type, [string
$mode = 'rw'])
|
|
Returns if the driver supports a given image type
Parameters:
_convert_image_type [line 661]
mixed _convert_image_type(
mixed
$type)
|
|
Returns the matching IMAGETYPE_* constant for a given image type
Parameters:
_getColor [line 1295]
array _getColor(
string
$colorOf, [array
$options = array()], [array
$default = array(0, 0, 0)])
|
|
Returns a color option
Parameters:
_getOption [line 1323]
mixed _getOption(
string
$name, [array
$options = array()], [mixed
$default = null])
|
|
Returns an option
Parameters:
_get_default_text_params [line 749]
array _get_default_text_params(
)
|
|
Returns the current value of $this->default_text_params.
_get_image_details [line 583]
mixed _get_image_details(
string
$image)
|
|
Sets the image type (in lowercase letters), the image height and width.
Parameters:
_parse_size [line 714]
mixed _parse_size(
mixed
$new_size, int
$old_size)
|
|
Parses input for number format and convert If either parameter is 0 it will be scaled proportionally
Parameters:
_prepare_cmd [line 957]
string _prepare_cmd(
string
$path, string
$command, [string
$args = ''])
|
|
Handles space in path and Windows/UNIX difference
Parameters:
_resize [line 973]
_rotation_angle [line 737]
float _rotation_angle(
float
$angle)
|
|
Returns an angle between 0 and 360 from any angle value
Parameters:
_set_img_x [line 763]
void _set_img_x(
int
$size)
|
|
Sets the image width
Parameters:
_set_img_y [line 777]
void _set_img_y(
int
$size)
|
|
Sets the image height
Parameters:
_set_new_x [line 791]
void _set_new_x(
int
$size)
|
|
Sets the new image width
Parameters:
_set_new_y [line 805]
void _set_new_y(
int
$size)
|
|
Sets the new image height
Parameters:
Documentation generated on Mon, 11 Mar 2019 15:48:01 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|