Liste de tous les membres
Fonctions membres publiques |
| __construct ($source=null) |
| crop ($width, $height, $left, $top, $createNew=true) |
| filter ($type, array $options=array()) |
| getHeight () |
| getWidth () |
| getPath () |
| isLoaded () |
| isTransparent () |
| loadFile ($path) |
| resize ($width, $height, $createNew=true, $scaleMethod=self::SCALE_INSIDE) |
| rotate ($angle, $background=-1, $createNew=true) |
| toFile ($path, $type=IMAGETYPE_JPEG, array $options=array()) |
Attributs protégés statiques |
static | $formats = array() |
Documentation des constructeurs et destructeur
JImage::__construct |
( |
|
$source = null | ) |
|
Class constructor.
- Paramètres:
-
mixed | $source | Either a file path for a source image or a GD resource handler for an image. |
- Depuis:
- 11.3
- Exceptions:
-
Références JLog\add(), elseif, et JLog\ERROR.
Documentation des fonctions membres
JImage::crop |
( |
|
$width, |
|
|
|
$height, |
|
|
|
$left, |
|
|
|
$top, |
|
|
|
$createNew = true |
|
) |
| |
Method to crop the current image.
- Paramètres:
-
mixed | $width | The width of the image section to crop in pixels or a percentage. |
mixed | $height | The height of the image section to crop in pixels or a percentage. |
integer | $left | The number of pixels from the left to start cropping. |
integer | $top | The number of pixels from the top to start cropping. |
bool | $createNew | If true the current image will be cloned, cropped and returned; else the current image will be cropped and returned. |
- Renvoie:
- JImage
- Depuis:
- 11.3
- Exceptions:
-
Références $color, $height, et $width.
JImage::filter |
( |
|
$type, |
|
|
array |
$options = array() |
|
) |
| |
Method to apply a filter to the image by type. Two examples are: grayscale and sketchy.
- Paramètres:
-
string | $type | The name of the image filter to apply. |
array | $options | An array of options for the filter. |
- Renvoie:
- JImage
- Depuis:
- 11.3
- Voir également:
- JImageFilter
- Exceptions:
-
LogicException | |
RuntimeException | |
Références $options, et $type.
JImage::getFilterInstance |
( |
|
$type | ) |
|
|
protected |
Method to get an image filter instance of a specified type.
- Paramètres:
-
string | $type | The image filter type to get. |
- Renvoie:
- JImageFilter
- Depuis:
- 11.3
- Exceptions:
-
Références $type, JLog\add(), et JLog\ERROR.
Method to get the height of the image in pixels.
- Renvoie:
- integer
- Depuis:
- 11.3
- Exceptions:
-
static JImage::getImageFileProperties |
( |
|
$path | ) |
|
|
static |
Method to return a properties object for an image given a filesystem path. The result object has values for image width, height, type, attributes, mime type, bits, and channels.
- Paramètres:
-
string | $path | The filesystem path to the image for which to get properties. |
- Renvoie:
- object
- Depuis:
- 11.3
- Exceptions:
-
InvalidArgumentException | |
RuntimeException | |
Références $path, et null.
Method to return the path
- Renvoie:
- string
- Depuis:
- 11.3
Références $path.
Method to get the width of the image in pixels.
- Renvoie:
- integer
- Depuis:
- 11.3
- Exceptions:
-
Method to determine whether or not an image has been loaded into the object.
- Renvoie:
- bool
- Depuis:
- 11.3
JImage::isTransparent |
( |
| ) |
|
Method to determine whether or not the image has transparency.
- Renvoie:
- bool
- Depuis:
- 11.3
- Exceptions:
-
JImage::loadFile |
( |
|
$path | ) |
|
Method to load a file into the JImage object as the resource.
- Paramètres:
-
string | $path | The filesystem path to load as an image. |
- Renvoie:
- void
- Depuis:
- 11.3
- Exceptions:
-
InvalidArgumentException | |
RuntimeException | |
Références $path, JLog\add(), et JLog\ERROR.
JImage::prepareDimensions |
( |
|
$width, |
|
|
|
$height, |
|
|
|
$scaleMethod |
|
) |
| |
|
protected |
Method to get the new dimensions for a resized image.
- Paramètres:
-
integer | $width | The width of the resized image in pixels. |
integer | $height | The height of the resized image in pixels. |
integer | $scaleMethod | The method to use for scaling |
- Renvoie:
- object
- Depuis:
- 11.3
- Exceptions:
-
Références $height, et $width.
JImage::resize |
( |
|
$width, |
|
|
|
$height, |
|
|
|
$createNew = true , |
|
|
|
$scaleMethod = self::SCALE_INSIDE |
|
) |
| |
Method to resize the current image.
- Paramètres:
-
mixed | $width | The width of the resized image in pixels or a percentage. |
mixed | $height | The height of the resized image in pixels or a percentage. |
bool | $createNew | If true the current image will be cloned, resized and returned; else the current image will be resized and returned. |
integer | $scaleMethod | Which method to use for scaling |
- Renvoie:
- JImage
- Depuis:
- 11.3
- Exceptions:
-
Références $color, $height, et $width.
JImage::rotate |
( |
|
$angle, |
|
|
|
$background = -1 , |
|
|
|
$createNew = true |
|
) |
| |
Method to rotate the current image.
- Paramètres:
-
mixed | $angle | The angle of rotation for the image |
integer | $background | The background color to use when areas are added due to rotation |
bool | $createNew | If true the current image will be cloned, rotated and returned; else the current image will be rotated and returned. |
- Renvoie:
- JImage
- Depuis:
- 11.3
- Exceptions:
-
JImage::sanitizeHeight |
( |
|
$height, |
|
|
|
$width |
|
) |
| |
|
protected |
Method to sanitize a height value.
- Paramètres:
-
mixed | $height | The input height value to sanitize. |
mixed | $width | The input width value for reference. |
- Renvoie:
- integer
- Depuis:
- 11.3
Références $height, $width, et null.
JImage::sanitizeOffset |
( |
|
$offset | ) |
|
|
protected |
Method to sanitize an offset value like left or top.
- Paramètres:
-
mixed | $offset | An offset value. |
- Renvoie:
- integer
- Depuis:
- 11.3
JImage::sanitizeWidth |
( |
|
$width, |
|
|
|
$height |
|
) |
| |
|
protected |
Method to sanitize a width value.
- Paramètres:
-
mixed | $width | The input width value to sanitize. |
mixed | $height | The input height value for reference. |
- Renvoie:
- integer
- Depuis:
- 11.3
Références $height, $width, et null.
JImage::toFile |
( |
|
$path, |
|
|
|
$type = IMAGETYPE_JPEG , |
|
|
array |
$options = array() |
|
) |
| |
Method to write the current image out to a file.
- Paramètres:
-
string | $path | The filesystem path to save the image. |
integer | $type | The image type to save the file as. |
array | $options | The image type options to use in saving the file. |
- Renvoie:
- void
- Voir également:
- http://www.php.net/manual/image.constants.php
- Depuis:
- 11.3
- Exceptions:
-
Références $options, $path, et $type.
Documentation des données membres
JImage::$formats = array() |
|
staticprotected |
const JImage::SCALE_FILL = 1 |
const JImage::SCALE_INSIDE = 2 |
const JImage::SCALE_OUTSIDE = 3 |
La documentation de cette classe a été générée à partir du fichier suivant :