Class: Image_Transform
Source Location: /Image_Transform-0.9.0/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 962]
addDropShadow [line 956]
addText [line 950]
canvasResize [line 985]
colorarray2colorhex [line 907]
mixed colorarray2colorhex(
array
$color)
|
|
Converts an array of RGB value into a #FFFFFF format color.
Parameters:
colorhex2colorarray [line 880]
array colorhex2colorarray(
string
$colorhex)
|
|
Converts a color string into an array of RGB values
Parameters:
crop [line 979]
display [line 822]
factory [line 199]
object an &factory(
string
$driver)
|
|
Creates a new Image_Transform object
Parameters:
fit [line 408]
bool|PEAR_Error fit(
$width,
$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:
flip [line 1038]
free [line 865]
gamma [line 998]
getImageHeight [line 722]
getImageSize [line 735]
Returns the image size and extra format information
getImageType [line 685]
Returns the type of the image being manipulated
getImageWidth [line 710]
getMimeType [line 699]
string getMimeType(
[string
$type = null])
|
|
Returns the MIME type of the image being manipulated
Parameters:
getTempDir [line 925]
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 938]
string getTempFile(
[string
$dirname = NULL])
|
|
Returns a temporary filename using tempnam() and the above getTmpDir() function.
Parameters:
getWebSafeFormat [line 754]
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 1059]
greyscale [line 1050]
isError [line 240]
mixed &isError(
[object PEAR_Error
$error = null])
|
|
Returns/sets an error when the instance couldn't initialize properly
Parameters:
keepSettingsOnSave [line 943]
void keepSettingsOnSave(
$bool)
|
|
Parameters:
load [line 806]
mirror [line 1025]
resize [line 259]
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 1012]
save [line 851]
scale [line 324]
mixed scale(
mixed
$size)
|
|
Scales an image by a percentage, factor or a given length This method preserves the aspect ratio
Parameters:
scaleByFactor [line 358]
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 393]
mixed scaleByLength(
$size)
|
|
Alias for scaleMaxLength
Parameters:
scaleByPercentage [line 344]
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 283]
mixed scaleByX(
int
$new_x)
|
|
Scales the image to the specified width This method preserves the aspect ratio
Parameters:
scaleByXY [line 294]
void scaleByXY(
[
$new_x = 0], [
$new_y = 0], [
$options = null])
|
|
Alias for resize()
Parameters:
scaleByY [line 308]
mixed scaleByY(
int
$new_y)
|
|
Scales the image to the specified height. This method preserves the aspect ratio
Parameters:
scaleMaxLength [line 374]
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 433]
void setOption(
string
$name, mixed
$value)
|
|
Sets one options
Parameters:
setOptions [line 448]
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 835]
TRUE supportsType(
string
$type, [string
$mode = 'rw'])
|
|
Returns if the driver supports a given image type
Parameters:
_convert_image_type [line 539]
mixed _convert_image_type(
mixed
$type)
|
|
Returns the matching IMAGETYPE_* constant for a given image type
Parameters:
_getColor [line 1073]
array _getColor(
string
$colorOf, [array
$options = array()], [array
$default = array(0, 0, 0)])
|
|
Returns a color option
Parameters:
_getOption [line 1100]
mixed _getOption(
string
$name, [array
$options = array()], [mixed
$default = null])
|
|
Returns an option
Parameters:
_get_default_text_params [line 626]
array _get_default_text_params(
)
|
|
Returns the current value of $this->default_text_params.
_get_image_details [line 461]
mixed _get_image_details(
$image)
|
|
Sets the image type (in lowercase letters), the image height and width.
Parameters:
_parse_size [line 592]
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 775]
string _prepare_cmd(
string
$path, string
$command, [string
$args = ''])
|
|
Handles space in path and Windows/UNIX difference
Parameters:
_resize [line 791]
_rotation_angle [line 614]
float _rotation_angle(
float
$angle)
|
|
Returns an angle between 0 and 360 from any angle value
Parameters:
_set_img_x [line 638]
void _set_img_x(
int
$size)
|
|
Sets the image width
Parameters:
_set_img_y [line 650]
void _set_img_y(
int
$size)
|
|
Sets the image height
Parameters:
_set_new_x [line 662]
void _set_new_x(
int
$size)
|
|
Sets the new image width
Parameters:
_set_new_y [line 674]
void _set_new_y(
int
$size)
|
|
Sets the new image height
Parameters:
Documentation generated on Mon, 11 Mar 2019 14:18:36 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|