XLI. Grafik-Funktionen
Sie
können
die
Grafik-Funktionen
von
PHP
nicht
nur
benutzen
,
um
die
Grösse
von
JPEG
,
GIF
,
PNG
und
SWF
-Bild-Dateien
zu
ermitteln
,
sondern
auch
-
sofern
Sie
die
GD
-Bibliothek
(
verfügbar
unter
http
:
/
/www.boutell.com
/
gd
/
)
eingebunden
haben
-
Grafiken
bzw
.
Bilder
dynamisch
(
also
zur
Laufzeit
ihres
Skripts
)
erzeugen
bzw
.
verändern
.
Die
mittels
dieser
Funktionen
veränderbaren
Grafik-Formate
sind
abhängig
von
der
bei
ihnen
installierten
GD-Version
.
Versionen
vor
gd-1.6
unterstützen
das
GIF
-
aber
kein
PNG-Format
.
Die
Versionen
danach
unterstützen
zwar
das
PNG
-
aber
nicht
mehr
das
GIF-Format
.
Um
JPEG-Grafiken
lesen
und
schreiben
zu
können
,
benötigen
Sie
jpeg-6b
(
siehe
unter
ftp
:
/
/ftp.uu.net
/
graphics
/
jpeg
/
)
.
Anschließend
müssen
Sie
gd
neu
compilieren
mit
--with-jpeg-dir=
/
path
/
to
/
jpeg-6b
.
Danach
muss
auch
PHP
mit
der
Option
--with-jpeg-dir=
/
path
/
to
/
jpeg-6b
neu
compiliert
werden
.
Die
Unterstützung
von
Type-1-Fonts
können
Sie
mit
der
Installation
von
t1lib
(
siehe
unter
ftp
:
/
/sunsite.unc.edu
/
pub
/
Linux
/
libs
/
graphics
/
)
einbinden
.
Beim
Compilieren
müssen
Sie
dann
noch
die
Option
--with-t1lib[
=dir
]
angeben
.
-
Inhaltsverzeichnis
-
exif_imagetype
-- Determine the type of an image
-
exif_read_data
-- Read the
EXIF
headers from
JPEG
or
TIFF
. This way you can read meta data generated by digital
cameras.
-
exif_thumbnail
-- Retrieve the embedded thumbnail of a TIFF or JPEG
image
-
gd_info
-- Retrieve information about the currently installed GD
library
-
getimagesize
-- Ermittelt die Ausmaße einer GIF-, JPEG-, PNG- oder
SWF-Grafik-Datei
-
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
-
imagearc
-- Zeichnen einer Teil-Ellipse
-
imagechar
-- Stellt ein Zeichen mit horizontaler Ausrichtung
dar
-
imagecharup
-- Zeichnet einen vertikal ausgerichteten Charakter
-
imagecolorallocate
-- Bestimmt die Farbe einer Grafik
-
imagecolorallocatealpha
-- Allocate a color for an image
-
imagecolorat
-- Ermittelt den Farbwert eines Bildpunktes
-
imagecolorclosest
-- Ermittelt den Farbwert-Index, der den angegebenen
Farben am nächsten liegt
-
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
-- Löscht eine Farbdefinition
-
imagecolorexact
-- Ermittelt den Index-Wert der angegebenen Farbe
-
imagecolorexactalpha
-- Get the index of the specified color + alpha
-
imagecolorresolve
-- Ermittelt den Index-Wert der angegebenen Farbe oder
die nächst mögliche Alternative dazu
-
imagecolorresolvealpha
-- Get the index of the specified color + alpha or its
closest possible alternative
-
imagecolorset
-- Setzt die Farbe für den angegebenen
Paletten-Index
-
imagecolorsforindex
-- Ermittelt die Farbwerte einer angegebenen
Farb-Palette
-
imagecolorstotal
-- Ermittelt die Anzahl der definierten Farben eines
Bildes
-
imagecolortransparent
-- Definiert eine Farbe als transparent
-
imagecopy
-- Kopiert einen Bildausschnitt
-
imagecopymerge
-- Copy and merge part of an image
-
imagecopymergegray
-- Copy and merge part of an image with gray scale
-
imagecopyresampled
-- Copy and resize part of an image with resampling
-
imagecopyresized
-- Kopieren und Ändern der Grösse eines Bild-Teiles
-
imagecreate
-- Erzeugt ein neues Bild
-
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
-- Erzeugt ein neues Bild im GIF-Format, welches aus
einer Datei oder von einer URL gelesen wird
-
imagecreatefromjpeg
-- Erzeugt ein neues Bild im JPEG-Format, welches aus
einer Datei oder von einer URL gelesen wird
-
imagecreatefrompng
-- Erzeugt ein neues Bild im PNG-Format, welches aus
einer Datei oder von einer URL gelesen wird
-
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
-- Create a new true color image
-
imagedashedline
-- Zeichnen einer gestrichelten Linie
-
imagedestroy
-- Löscht ein Bild
-
imageellipse
-- Draw an ellipse
-
imagefill
-- Füllen mit Farbe ("flood fill")
-
imagefilledarc
-- Draw a partial ellipse and fill it
-
imagefilledellipse
-- Draw a filled ellipse
-
imagefilledpolygon
-- Zeichnet ein gefülltes Vieleck (Polygon)
-
imagefilledrectangle
-- Zeichnet ein gefülltes Rechteck
-
imagefilltoborder
-- Flächen-Farbfüllung ("flood fill") mit einer
angegebenen Farbe
-
imagefontheight
-- Ermittelt die Font-Höhe
-
imagefontwidth
-- Ermittelt die Font-Breite
-
imageftbbox
-- Give the bounding box of a text using fonts via
freetype2
-
imagefttext
-- Write text to the image using fonts using FreeType
2
-
imagegammacorrect
-- Anwendung einer Gamma-Korrektur auf ein GD-Bild
-
imagegd2
-- Output GD2 image to browser or file
-
imagegd
-- Output GD image to browser or file
-
imagegif
-- Ausgabe eines Bildes an den Browser oder in eine
Datei
-
imageinterlace
-- Schaltet die Interlaced-Darstellung eines Bildes an
oder aus
-
imagejpeg
-- Ausgabe des Bildes im Browser oder als Datei
-
imageline
-- Zeichnen einer Linie
-
imageloadfont
-- Lädt einen neuen Font
-
imagepalettecopy
-- Copy the palette from one image to another
-
imagepng
-- Ausgabe eines Bildes an den Browser oder in eine
Datei
-
imagepolygon
-- Zeichnen eines Vielecks (Polygon)
-
imagepsbbox
-- Ermittelt die Ausmaße des Rechtecks, das für die
Ausgabe eines Textes unter Verwendung eines
PostScript-Fonts (Typ 1) notwendig ist.
-
imagepscopyfont
-- Erstellt eine Kopie eines bereits geladenen Fonts für
weitere Veränderungen
-
imagepsencodefont
-- Ändert die Vektor-Beschreibung eines Fonts
-
imagepsextendfont
-- Vergrößert oder komprimiert einen Font
-
imagepsfreefont
-- Gibt den durch einen Typ 1 PostScript-Font belegten
Speicher wieder frei
-
imagepsloadfont
-- Lädt einen Typ 1 PostScript-Font aus einer Datei
-
imagepsslantfont
-- Setzt einen Font schräg
-
imagepstext
-- Ausgabe eines Textes auf einem Bild unter Verwendung
von Typ 1 PostScript-Fonts
-
imagerectangle
-- Zeichnet ein Rechteck
-
imagerotate
-- Rotate an image with a given angle
-
imagesetbrush
-- Set the brush image for line drawing
-
imagesetpixel
-- Setzt ein einzelnes Pixel
-
imagesetstyle
-- Set the style for line drawing
-
imagesetthickness
-- Set the thickness for line drawing
-
imagesettile
-- Set the tile image for filling
-
imagestring
-- Zeichnet einen horizontalen String
-
imagestringup
-- Zeichnet einen vertikalen String
-
imagesx
-- Ermittelt die Bild-Breite
-
imagesy
-- Ermittelt die Bild-Höhe
-
imagetruecolortopalette
-- Convert a true color image to a palette image
-
imagettfbbox
-- Ermittelt die Rahmenmaße für die Ausgabe eines Textes
im True-Type-Format
-
imagettftext
-- Erzeugt TTF-Text im Bild
-
imagetypes
-- Gibt die von der aktuell verwendeten PHP-Version
unterstützten Grafik-Formate zurück
-
imagewbmp
-- Output image to browser or file
-
iptcembed
-- Embed binary IPTC data into a JPEG image
-
iptcparse
-- Parse a binary IPTC
http://www.iptc.org/
block into single tags.
-
jpeg2wbmp
-- Convert JPEG image file to WBMP image file
-
png2wbmp
-- Convert PNG image file to WBMP image file
-
read_exif_data
-- Liest die EXIF Header-Infos einer JPEG-Grafik