Funciones para imágenes
Puede usar las funciones para imágenes en PHP para obtener el tamaño de imágenes JPEG, GIF, PNG, SWF, TIFF y JPEG2000, y si tiene instalada la biblioteca GD (disponible en » https://www.libgd.org/) también podrá crear y manipular imágenes.
Si tiene PHP compilado con --enable-exif puede trabajar con la información guardada en las cabeceras de las imágenes JPEG y TIFF. Estas funciones no requieren la biblioteca GD.
Los formatos de imágenes que puede manipular dependen de la versión de GD que instale y de cualquier otra biblioteca que GD pueda necesitar para acceder a esos formatos de imagen. Las versiones de GD anteriores a la GD-1.6 soportan imágenes en formato gif y no soportan png, mientras que las versiones superiores a la GD-1.6 soportan el formato png y no el gif.
Antes de poder leer y escribir imágenes en formato jpeg, deberá obtener e instalar jpeg-6b (disponible en » ftp://ftp.uu.net/graphics/jpeg/), y después recompilar GD para poder hacer uso de jpeg-6b. También tendrá que compilar PHP con la opción --with-jpeg-dir=/ruta/a/jpeg-6b.
Para añadir el soporte de fuentes Type 1, puede instalar t1lib (disponible en » ftp://sunsite.unc.edu/pub/Linux/libs/graphics/), y entonces añadir la opción --with-t1lib[=dir] al recompilar.
Table of Contents
- gd_info — Retrieve information about the currently installed GD library
- getimagesize — Obtener el tamaño de una imagen
- image_type_to_extension — Get file extension for image type
- image_type_to_mime_type — Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype
- image2wbmp — Output image to browser or file
- imagealphablending — Set the blending mode for an image
- imageantialias — Should antialias functions be used or not
- imagearc — Dibuja una elipse parcial
- imagechar — Dibuja un carácter horizontalmente
- imagecharup — Dibuja un carácter vertical
- imagecolorallocate — Reserva un color para una imagen
- imagecolorallocatealpha — Allocate a color for an image
- imagecolorat — Obtiende el Ãndice del color de un pixel
- imagecolorclosest — Obtiene el Ãndice del color más cercano al color especificado
- imagecolorclosestalpha — Get the index of the closest color to the specified color + alpha
- imagecolorclosesthwb — Get the index of the color which has the hue, white and blackness nearest to the given color
- imagecolordeallocate — De-allocate a color for an image
- imagecolorexact — Devuelve el Ãndice del color especificado
- imagecolorexactalpha — Get the index of the specified color + alpha
- imagecolormatch — Makes the colors of the palette version of an image more closely match the true color version
- imagecolorresolve — Devuelve el Ãndice del color especificado o su posible alternativa más cercana
- imagecolorresolvealpha — Get the index of the specified color + alpha or its closest possible alternative
- imagecolorset — Establece el color para el Ãndice de la paleta especificado
- imagecolorsforindex — Obtiene los colores de un Ãndice
- imagecolorstotal — Encuentra el número de colores de la paleta de una imagen
- imagecolortransparent — Define un color como transparente
- imageconvolution — Apply a 3x3 convolution matrix, using coefficient and offset
- imagecopy — Copy part of an image
- imagecopymerge — Copy and merge part of an image
- imagecopymergegray — Copy and merge part of an image with gray scale
- imagecopyresampled — Copia y reescala parte de una imagen con remuestreo
- imagecopyresized — Copia y redimensiona parte de una imagen
- imagecreate — Crea una nueva imagen con una paleta de colores
- imagecreatefromgd2 — Create a new image from GD2 file or URL
- imagecreatefromgd2part — Create a new image from a given part of GD2 file or URL
- imagecreatefromgd — Create a new image from GD file or URL
- imagecreatefromgif — Crear una nueva imagen a partir de un archivo o URL
- imagecreatefromjpeg — Crea una imagen nueva desde un archivo o URL
- imagecreatefrompng — Crea una imagen nueva desde un archivo o URL
- imagecreatefromstring — Create a new image from the image stream in the string
- imagecreatefromwbmp — Create a new image from file or URL
- imagecreatefromxbm — Create a new image from file or URL
- imagecreatefromxpm — Create a new image from file or URL
- imagecreatetruecolor — Crea una imagen nueva en color real (true color)
- imagedashedline — Dibuja una lÃnea discontinua
- imagedestroy — Destruye una imagen
- imageellipse — Draw an ellipse
- imagefill — Rellena de color
- imagefilledarc — Draw a partial ellipse and fill it
- imagefilledellipse — Draw a filled ellipse
- imagefilledpolygon — Dibuja un polÃgono relleno
- imagefilledrectangle — Dibuja un rectángulo relleno
- imagefilltoborder — Relleno de un color especifico
- imagefilter — Applies a filter to an image
- imagefontheight — Devuelve la altura de una fuente
- imagefontwidth — Devuelve la anchura de una fuente
- imageftbbox — Give the bounding box of a text using fonts via freetype2
- imagefttext — Write text to the image using fonts using FreeType 2
- imagegammacorrect — Apply a gamma correction to a GD image
- imagegd2 — Output GD2 image to browser or file
- imagegd — Output GD image to browser or file
- imagegif — Producir la salida de una imagen al navegador o a un archivo
- imagegrabscreen — Captures the whole screen
- imagegrabwindow — Captures a window
- imageinterlace — Activa o desactiva el entrelazado
- imageistruecolor — Finds whether an image is a truecolor image
- imagejpeg — Output image to browser or file
- imagelayereffect — Set the alpha blending flag to use the bundled libgd layering effects
- imageline — Dibuja una lÃnea
- imageloadfont — Cargar una fuente nueva
- imagepalettecopy — Copy the palette from one image to another
- imagepng — Output a PNG image to either the browser or a file
- imagepolygon — Dibuja un polÃgono
- imagepsbbox — Entregar la cada circundante de un rectángulo de texto usando fuentes PostScript Type1
- imagepsencodefont — Modificar el vector de codificación de caracteres de una fuente
- imagepsextendfont — Extend or condense a font
- imagepsfreefont — Liberar memoria usada por una fuente PostScript Type 1
- imagepsloadfont — Cargar una fuente PostScript Tipo 1 desde un archivo
- imagepsslantfont — Slant a font
- imagepstext — Dibuja un texto sobre una imagen usando fuentes PostScript Type1
- imagerectangle — Dibujar un rectángulo
- imagerotate — Rotate an image with a given angle
- imagesavealpha — Set the flag to save full alpha channel information (as opposed to single-color transparency) when saving PNG images
- imagesetbrush — Set the brush image for line drawing
- imagesetpixel — Definir un pixel individual
- imagesetstyle — Set the style for line drawing
- imagesetthickness — Set the thickness for line drawing
- imagesettile — Set the tile image for filling
- imagestring — Dibujar una cadena horizontalmente
- imagestringup — Dibujar una cadena verticalmente
- imagesx — Obtener el ancho de una imagen
- imagesy — Obtener la altura de una imagen
- imagetruecolortopalette — Convert a true color image to a palette image
- imagettfbbox — Entrega la caja circundante de un texto usando fuentes TrueType
- imagettftext — Escribir un texto sobre la imagen usando fuentes TrueType
- imagetypes — Return the image types supported by this PHP build
- imagewbmp — Output image to browser or file
- imagexbm — Output XBM image to browser or file
- iptcembed — Embed binary IPTC data into a JPEG image
- iptcparse — Parse a binary IPTC block into single tags.
- jpeg2wbmp — Convert JPEG image file to WBMP image file
- png2wbmp — Convert PNG image file to WBMP image file