XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
RMImageResizer Class Reference

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 = ''
 

Detailed Description

Definition at line 11 of file imageresizer.php.

Constructor & Destructor Documentation

RMImageResizer::__construct (   $file = '',
  $filetarget = '' 
)
Parameters
string$fileArchivo existente
string$filetargetArchivo destino

Definition at line 19 of file imageresizer.php.

References $file, and $filetarget.

Member Function Documentation

RMImageResizer::checkFiles ( )
private

Comprueba que los archivos de entrada y salida hayan sido especificados

Returns
bool

Definition at line 54 of file imageresizer.php.

Referenced by resizeAndCrop(), resizeWidth(), and resizeWidthOrHeight().

Here is the caller graph for this function:

RMImageResizer::createImage (   $format)

Creamos la im?gen en memoria

Returns
object

Definition at line 188 of file imageresizer.php.

Referenced by resizeAndCrop(), resizeWidth(), and resizeWidthOrHeight().

Here is the caller graph for this function:

RMImageResizer::getFormat ( )
private

Obtiene el formato de la im?gen

Returns
string

Definition at line 221 of file imageresizer.php.

References elseif().

Referenced by resizeAndCrop(), resizeWidth(), and resizeWidthOrHeight().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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

Parameters
int$twAncho de la im?gen a generar
int$thAlto de la im?gen a generar
int$redValor Rojo para la im?gen generada
int$greenValor Verde para la im?gen generada
int$blueValor 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().

Here is the call graph for this function:

Here is the caller graph for this function:

RMImageResizer::resizeWidth (   $width,
  $force = false 
)

Redimensiona una im?gen a un ancho espec?fico

Parameters
int$widthAncho de la im?gen
bool$forceCrea 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().

Here is the call graph for this function:

RMImageResizer::resizeWidthOrHeight (   $width,
  $height,
  $force = false 
)

Redimensiona una im?gen limitando el ancho o alto a un valor dado

Parameters
int$widthAncho de la im?gen
int$heightAlto de la im?gen
bool$forceCrea 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().

Here is the call graph for this function:

RMImageResizer::setSourceFile (   $file)

Establece el archivo origen

Parameters
string$fileRuta completa al archivo origen

Definition at line 40 of file imageresizer.php.

References $file.

RMImageResizer::setTargetFile (   $file)

Establece el archivo destino

Parameters
string$fileRuta completa al archivo destino

Definition at line 27 of file imageresizer.php.

References $file.

Member Data Documentation

RMImageResizer::$file = ''
private

Definition at line 13 of file imageresizer.php.

Referenced by __construct(), getSourceFile(), setSourceFile(), and setTargetFile().

RMImageResizer::$filetarget = ''
private

Definition at line 14 of file imageresizer.php.

Referenced by __construct(), and getTargetFile().


The documentation for this class was generated from the following file: