XOOPS RMCommon Utilities
2.1.8.91RC
|
Public Member Functions | |
__construct ($file='', $filetarget='') | |
createImage ($format) | |
getSourceFile () | |
getTargetFile () | |
imageFromFormat ($format, $image, $quality=90) | |
resizeAndCrop ($tw, $th, $red=255, $green=255, $blue=255) | |
resizeWidth ($width, $force=false) | |
resizeWidthOrHeight ($width, $height, $force=false) | |
setSourceFile ($file) | |
setTargetFile ($file) | |
Private Member Functions | |
checkFiles () | |
getFormat () | |
Private Attributes | |
$file = '' | |
$filetarget = '' | |
Definition at line 11 of file imageresizer.php.
RMImageResizer::__construct | ( | $file = '' , |
|
$filetarget = '' |
|||
) |
string | $file | Archivo existente |
string | $filetarget | Archivo destino |
Definition at line 19 of file imageresizer.php.
References $file, and $filetarget.
|
private |
Comprueba que los archivos de entrada y salida hayan sido especificados
Definition at line 54 of file imageresizer.php.
Referenced by resizeAndCrop(), resizeWidth(), and resizeWidthOrHeight().
RMImageResizer::createImage | ( | $format | ) |
Creamos la im?gen en memoria
Definition at line 188 of file imageresizer.php.
Referenced by resizeAndCrop(), resizeWidth(), and resizeWidthOrHeight().
|
private |
Obtiene el formato de la im?gen
Definition at line 221 of file imageresizer.php.
References elseif().
Referenced by resizeAndCrop(), resizeWidth(), and resizeWidthOrHeight().
RMImageResizer::getSourceFile | ( | ) |
Obtiene la ruta completa del archivo origen
Definition at line 46 of file imageresizer.php.
References $file.
RMImageResizer::getTargetFile | ( | ) |
Obtiene la ruta completa del archivo destino
Definition at line 33 of file imageresizer.php.
References $filetarget.
RMImageResizer::imageFromFormat | ( | $format, | |
$image, | |||
$quality = 90 |
|||
) |
Guarda la im?gen modificada
Definition at line 204 of file imageresizer.php.
References $image.
Referenced by resizeAndCrop(), resizeWidth(), and resizeWidthOrHeight().
RMImageResizer::resizeAndCrop | ( | $tw, | |
$th, | |||
$red = 255 , |
|||
$green = 255 , |
|||
$blue = 255 |
|||
) |
Redimensiona un im?gen en forma de cuadro. Si la im?gen es rectangular recorta la medida mas grande
int | $tw | Ancho de la im?gen a generar |
int | $th | Alto de la im?gen a generar |
int | $red | Valor Rojo para la im?gen generada |
int | $green | Valor Verde para la im?gen generada |
int | $blue | Valor Azul para la im?gen generada |
Definition at line 74 of file imageresizer.php.
References $image, checkFiles(), createImage(), getFormat(), and imageFromFormat().
Referenced by resize_images(), and update_image().
RMImageResizer::resizeWidth | ( | $width, | |
$force = false |
|||
) |
Redimensiona una im?gen a un ancho espec?fico
int | $width | Ancho de la im?gen |
bool | $force | Crea una im?gen anque esta sea mas peque?a que el ancho dado |
Definition at line 133 of file imageresizer.php.
References $image, checkFiles(), createImage(), getFormat(), and imageFromFormat().
RMImageResizer::resizeWidthOrHeight | ( | $width, | |
$height, | |||
$force = false |
|||
) |
Redimensiona una im?gen limitando el ancho o alto a un valor dado
int | $width | Ancho de la im?gen |
int | $height | Alto de la im?gen |
bool | $force | Crea una im?gen aunque esta sea mas peque?a que el ancho dado |
Definition at line 165 of file imageresizer.php.
References $image, checkFiles(), createImage(), getFormat(), and imageFromFormat().
RMImageResizer::setSourceFile | ( | $file | ) |
Establece el archivo origen
string | $file | Ruta completa al archivo origen |
Definition at line 40 of file imageresizer.php.
References $file.
RMImageResizer::setTargetFile | ( | $file | ) |
Establece el archivo destino
string | $file | Ruta completa al archivo destino |
Definition at line 27 of file imageresizer.php.
References $file.
|
private |
Definition at line 13 of file imageresizer.php.
Referenced by __construct(), getSourceFile(), setSourceFile(), and setTargetFile().
|
private |
Definition at line 14 of file imageresizer.php.
Referenced by __construct(), and getTargetFile().