Search

GD Graphics Library

Dictionary.com

Gd

Symbol, Chemistry.

  1. gadolinium.

Show More

GD

Real Estate.
  1. garbage disposal.
Show More

gd.

  1. good.
  2. guard.
Show More

G.D.

  1. Grand Duchess.
  2. Grand Duke.
Show More
Dictionary.com Unabridged
Based on the Random House Unabridged Dictionary, © Random House, Inc. 2018

Examples from the Web for gd

Historical Examples

  • The spelling goud 5, 50, &c., for gd ‘good’ may indicate a sound change.

    Fourteenth Century Verse & Prose

    Various

  • Se man gesih and fyli Gode, see cann understandan God, and gd weorc wyrc.

    The Homilies of the Anglo-Saxon Church

    lfric

  • Se e gd beon wile, clypige to am e fre is gd, t he hine gdne gewyrce.

    The Homilies of the Anglo-Saxon Church

    lfric

  • Se man hf gold, t is gd be his me: he hf land and welan, a sint gde.

    The Homilies of the Anglo-Saxon Church

    lfric

  • Gif nig gesceaft is gd, onne is seo gdnys of am Scyppende, see is healice gd.

    The Homilies of the Anglo-Saxon Church

    lfric


British Dictionary definitions for gd

gd

the internet domain name for
  1. Grenada
Show More

Gd

the chemical symbol for
  1. gadolinium
Show More
Collins English Dictionary – Complete & Unabridged 2012 Digital Edition
© William Collins Sons & Co. Ltd. 1979, 1986 © HarperCollins
Publishers 1998, 2000, 2003, 2005, 2006, 2007, 2009, 2012

gd in Medicine

Gd

  1. The symbol for the element gadolinium

Show More
The American Heritage® Stedman's Medical Dictionary
Copyright © 2002, 2001, 1995 by Houghton Mifflin Company. Published by Houghton Mifflin Company.

gd in Science

Gd

  1. The symbol for gadolinium.
Show More

gadolinium

[găd′l-ĭnē-əm]

Gd
  1. A silvery-white, malleable, ductile metallic element of the lanthanide series that has seven natural isotopes and 11 artificial isotopes. Two of the natural isotopes, Gd 155 and Gd 157, are the best known neutron absorbers. Gadolinium is used to improve the heat and corrosion resistance of iron, chromium, and various alloys and in medicine as a contrast medium for magnetic resonance imaging and as a radioisotope in bone mineral analysis. Atomic number 64; atomic weight 157.25; melting point 1,312°C; boiling point approximately 3,000°C; specific gravity from 7.8 to 7.896; valence 3. See Periodic Table .
Show More
The American Heritage® Science Dictionary
Copyright © 2011. Published by Houghton Mifflin Harcourt Publishing Company. All rights reserved.

Word of the Day

locavore

LibGD 2.2.5 release

The LibGD team is proud to announce the 2.2.5 release of libgd.

Security related fixes:

  • Double-free in gdImagePngPtr(). (CVE-2017-6362)
  • Buffer over-read into uninitialized memory. (CVE-2017-7890)

For full list of changes, see CHANGELOG.md .

This is a recommended update.

You can download the 2.2.5 version of GD Graphics Library from
the libgd project .

Check out the full commits list since the previous release.

Other articles


  1. LibGD 2.2.4 release

    LibGD team is proud to announce the 2.2.4 release of libgd.

    Security related fixes:
    This flaw is caused by loading data from external sources (file, custom ctx, etc) and are hard to validate before calling libgd APIs:

    • gdImageCreate() doesn’t check for oversized images and as such is
      prone …

    read more

  2. LibGD 2.2.3 release

    We welcome the 2.2.3 release around a month after 2.2.2 (we are getting consistent). Another important
    milestone in the GD 2.2 series.

    Security related fixes:
    This flaw is caused by loading data from external sources (file, custom ctx, etc) and are hard to validate before …

    read more

  3. LibGD 2.2.2 release

    Exactly a month after 2.2.1 we welcome the 2.2.2 release. An important
    milestone in the GD 2.2 series.

    Security related fixes:

    • Integer Overflow in gdImagePaletteToTrueColor() resulting in heap overflow (CVE-2016-5767)
    • #215 Stack overflow with gdImageFillToBorder (CVE-2015-8874, CVE-2016-9933)
    • NULL Pointer Dereference at _gdScaleVert

    We also like …

    read more

  4. LibGD 2.2.1 release

    Hot on the tail of the 2.2.0 release, we’ve got 2.2.1 ready! A security
    issue was missed in the previous bug triaging but that’s in here now.

    This is a recommended update.

    You can download the 2.2.1 version of GD Graphics Library from
    the …

    read more

  5. LibGD 2.2.0 release

    GD team proudly announces that the 2.2.0 version of GD Graphics
    Library has been released. We have fixed a good number of reported
    bugs. The cmake build is getting better, but most people should
    still use the configure script. See the Changelog files for a full
    list with …

    read more

  6. LibGD 2.1.1 final release

    GD team proudly announces that the 2.1.1 version of GD Graphics
    Library has been released. We have fixed some reported bugs and
    improved the build scripts (cmake and configure). See the Changelog
    files for a full list with details or CVEs.

    This is a recommended update.

    You can …

    read more

  7. LibGD 2.1.0 final release

    GD team proudly announces that the 2.1.0 version of GD Graphics
    Library has been released. We have fixed some reported bugs and
    improved the build scripts (cmake and configure).

    You can download the 2.1.0 version of GD Graphics Library from
    the libgd project .

    We would like …

    read more

  8. LibGD 2.1.0-rc1 release

    GD team proudly announces that the 2.1.0-rc1 version of GD Graphics
    Library has been released. We have fixed some reported bugs and
    glitches and so far everything looks fine and stable, thus we are
    releasing RC1. No more functionality will be added, just bugfixes.

    You can download the …

    read more

  9. LibGD 2.1.0-alpha1 release

    GD team proudly announces that the 2.1.0-alpha1 version of GD Graphics
    Library has been released. Most of the improvements that PHP GD team
    had made to GD Graphics Library has been merged into 2.1.0-alpha1
    release.

    You can download the 2.1.0-alpha1 version of GD Graphics …

    read more

Page 1 / 2
»

links

  • Downloads
  • Issues
  • Mailing List

social

  • atom feed
  • github
  • irc
  • gitter

GD

class
GD extends GDBackend

This class is maintained for backwards-compatibility only. Please use the @link GDBackend class instead.

Properties

string$classfrom  SS_Object

Methods

static  Config_ForClass |null
config ()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .

from  SS_Object
static  SS_Object
create ()

An implementation of the factory method, allows you to create an instance of a class

from  SS_Object
static  SS_Object
singleton ()

Creates a class instance by the “singleton” design pattern.

from  SS_Object
static 
create_from_string ($classSpec, $firstArg = null)

Create an object from a string representation. It treats it as a PHP constructor without the
‘new’ keyword. It also manages to construct the object without the use of eval().

from  SS_Object
static 
parse_class_spec ($classSpec)

Parses a class-spec, such as “Versioned(‘Stage’,’Live’)”, as passed to create_from_string().

from  SS_Object
static  SS_Object
strong_create ()

Similar to @link Object::create(), except that classes are only overloaded if you set the $strong parameter to
TRUE when using @link Object::useCustomClass()

from  SS_Object
static 
useCustomClass (string $oldClass, string $newClass, bool $strong = false)

This class allows you to overload classes with other classes when they are constructed using the factory method
@link Object::create()

from  SS_Object
static string
getCustomClass (string $class)

If a class has been overloaded, get the class name it has been overloaded with – otherwise return the class name

from  SS_Object
static any
static_lookup ($class, $name, null $default = null)

Get the value of a static property of a class, even in that property is declared protected (but not private),
without any inheritance, merging or parent lookup if it doesn’t exist on the given class.

from  SS_Object
static 
get_static ($class, $name, $uncached = false)
deprecated

No description

from  SS_Object
static 
set_static ($class, $name, $value)
deprecated

No description

from  SS_Object
static 
uninherited_static ($class, $name, $uncached = false)
deprecated

No description

from  SS_Object
static 
combined_static ($class, $name, $ceiling = false)
deprecated

No description

from  SS_Object
static 
addStaticVars ($class, $properties, $replace = false)
deprecated

No description

from  SS_Object
static 
add_static_var ($class, $name, $value, $replace = false)
deprecated

No description

from  SS_Object
static 
has_extension (string $classOrExtension, string $requiredExtension = null, boolean $strict = false)

Return TRUE if a class has a specified extension.

from  SS_Object
static 
add_extension (string $classOrExtension, string $extension = null)

Add an extension to a specific class.

from  SS_Object
static 
remove_extension (string $extension)

Remove an extension from a class.

from  SS_Object
static array
get_extensions (string $class, bool $includeArgumentString = false)

No description

from  SS_Object
static 
get_extra_config_sources ($class = null)

No description

from  SS_Object
__construct ($filename = null, $args = array())

No description

from  GDBackend
mixed
__call (string $method, array $arguments)

Attemps to locate and call a method dynamically added to a class at runtime if a default cannot be located

from  SS_Object
bool
hasMethod (string $method)

Return TRUE if a method exists on this object

from  SS_Object
array
allMethodNames (bool $custom = false)

Return the names of all the methods available on this object

from  SS_Object
stat ($name, $uncached = false)

No description

from  SS_Object
set_stat ($name, $value)

No description

from  SS_Object
uninherited ($name)

No description

from  SS_Object
bool
exists ()

Return true if this object “exists” i.e. has a sensible value

from  SS_Object
string
parentClass ()

No description

from  SS_Object
bool
is_a (string $class)

Check if this class is an instance of a specific class, or has that class as one of its parents

from  SS_Object
string
__toString ()

No description

from  SS_Object
mixed
invokeWithExtensions (string $method, mixed $argument = null)

Calls a method if available on both this object and all applied @link Extensions, and then attempts to merge
all results into an array

from  SS_Object
array
extend (string $method, mixed $a1 = null, mixed $a2 = null, mixed $a3 = null, mixed $a4 = null, mixed $a5 = null, mixed $a6 = null, mixed $a7 = null)

Run the given function on all of this object’s extensions. Note that this method originally returned void, so if
you wanted to return results, you’re hosed

from  SS_Object
Extension
getExtensionInstance (string $extension)

Get an extension instance attached to this object by name.

from  SS_Object
bool
hasExtension (string $extension)

Returns TRUE if this object instance has a specific extension applied
in @link $extension_instances. Extension instances are initialized
at constructor time, meaning if you use @link add_extension()
afterwards, the added extension will just be added to new instances
of the extended class. Use the static method @link has_extension()
to check if a class (not an instance) has a specific extension.

from  SS_Object
array
getExtensionInstances ()

Get all extension instances for this specific object instance.

from  SS_Object
mixed
cacheToFile (string $method, int $lifetime = 3600, string $ID = false, array $arguments = array())

Cache the results of an instance method in this object to a file, or if it is already cache return the cached
results

from  SS_Object
clearCache ($method, $ID = false, $arguments = array())

Clears the cache for the given cacheToFile call

from  SS_Object
static 
set_default_quality (quality $quality)
deprecated

No description

void
setImageResource (mixed $resource)

setImageResource

from  GDBackend
setGD ($gd)
deprecated

No description

from  GDBackend
mixed
getImageResource ()

getImageResource

from  GDBackend
getGD ()
deprecated

No description

from  GDBackend
boolean
imageAvailable (string $filename, string $manipulation)

No description

from  GDBackend
boolean
checkAvailableMemory (string $filename)

Check if we’ve got enough memory available for resampling this image. This check is rough,
so it will not catch all images that are too large – it also won’t work accurately on large,
animated GIFs as bits per pixel can’t be calculated for an animated GIF with a global color
table.

from  GDBackend
boolean
failedResample ($filename, $manipulation)

Check if this image has previously crashed GD when attempting to open it – if it’s opened
successfully, the manipulation’s cache key is removed.

from  GDBackend
void
setQuality (int $quality)

Set the image quality, used when saving JPEGs.

from  GDBackend
Image_Backend
croppedResize (int $width, int $height)

Resize an image to cover the given width/height completely, and crop off any overhanging edges.

from  GDBackend
fittedResize ($width, $height)

Resizes the image to fit within the given region.

from  GDBackend
boolean
hasImageResource ()

hasImageResource

from  GDBackend
hasGD ()
deprecated

No description

from  GDBackend
Image_Backend
resize (int $width, int $height)

Resize an image, skewing it as necessary.

from  GDBackend
GD
rotate (angle $angle)

Rotates image by given angle.

from  GDBackend
GD
rotatePixelByPixel (angle $angle)

Rotates image by given angle. It’s slow because makes it pixel by pixel rather than
using built-in function. Used when imagerotate function is not available(i.e. Ubuntu)

from  GDBackend
GD
crop (top $top, left $left, width $width, height $height)

Crop’s part of image.

from  GDBackend
integer
getWidth ()

Method return width of image.

from  GDBackend
integer
getHeight ()

Method return height of image.

from  GDBackend
Image_Backend
resizeByWidth (int $width)

Resize an image by width. Preserves aspect ratio.

from  GDBackend
Image_Backend
resizeByHeight (int $height)

Resize an image by height. Preserves aspect ratio

from  GDBackend
Image_Backend
resizeRatio ($maxWidth, $maxHeight, $useAsMinimum = false)

Resize the image by preserving aspect ratio. By default, it will keep the image inside the maxWidth
and maxHeight. Passing useAsMinimum will make the smaller dimension equal to the maximum corresponding dimension

from  GDBackend
static 
color_web2gd ($image, $webColor, $transparencyPercent)

No description

from  GDBackend
Image_Backend
paddedResize ($width, $height, $backgroundColor = "FFFFFF", transparencyPercent $transparencyPercent)

Resize to fit fully within the given box, without resizing. Extra space left around
the image will be padded with the background color.

from  GDBackend
greyscale ($R = 299, $G = 587, $B = 114, $brightness = 100)

Make the image greyscale.

from  GDBackend
makeDir ($dirname)

No description

from  GDBackend
void
writeTo ($filename)

writeTo

from  GDBackend
void
onBeforeDelete ( Image $frontend)

No description

from  GDBackend

Details

in SS_Object at line 60

static Config_ForClass |null
config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .

….).

Return Value

Config_ForClass |null

in SS_Object at line 132

static SS_Object
create()

An implementation of the factory method, allows you to create an instance of a class

This method first for strong class overloads (singletons & DB interaction), then custom class overloads. If an
overload is found, an instance of this is returned rather than the original class. To overload a class, use
@link Object::useCustomClass()

This can be called in one of two ways – either calling via the class directly,
or calling on Object and passing the class name as the first parameter. The following
are equivalent:
$list = DataList::create(‘SiteTree’);
$list = SiteTree::get();

Return Value

SS_Object

in SS_Object at line 155

static SS_Object
singleton()

Creates a class instance by the “singleton” design pattern.

It will always return the same instance for this class,
which can be used for performance reasons and as a simple
way to access instance methods which don’t rely on instance
data (e.g. the custom SilverStripe static handling).

Return Value

SS_Object The singleton instance

in SS_Object at line 190

static
create_from_string($classSpec, $firstArg = null)

Create an object from a string representation. It treats it as a PHP constructor without the
‘new’ keyword. It also manages to construct the object without the use of eval().

Construction itself is done with Object::create(), so that Object::useCustomClass() calls
are respected.

Object::create_from_string("Versioned('Stage','Live')") will return the result of
Versioned::create('Stage', 'Live);

It is designed for simple, clonable objects. The first time this method is called for a given
string it is cached, and clones of that object are returned.

If you pass the $firstArg argument, this will be prepended to the constructor arguments. It’s
impossible to pass null as the firstArg argument.

Object::create_from_string("Varchar(50)", "MyField") will return the result of
Vachar::create('MyField', '50');

Arguments are always strings, although this is a quirk of the current implementation rather
than something that can be relied upon.

Parameters

$classSpec
$firstArg

in SS_Object at line 215

static
parse_class_spec($classSpec)

Parses a class-spec, such as “Versioned(‘Stage’,’Live’)”, as passed to create_from_string().

Returns a 2-elemnent array, with classname and arguments

Parameters

$classSpec

in SS_Object at line 341

static SS_Object
strong_create()

Similar to @link Object::create(), except that classes are only overloaded if you set the $strong parameter to
TRUE when using @link Object::useCustomClass()

Return Value

SS_Object

in SS_Object at line 361

static
useCustomClass(string $oldClass, string $newClass, bool $strong = false)

This class allows you to overload classes with other classes when they are constructed using the factory method
@link Object::create()

Parameters

string$oldClassthe class to replace
string$newClassthe class to replace it with
bool$strongallows you to enforce a certain class replacement under all circumstances. This is used in
singletons and DB interaction classes

in SS_Object at line 375

static string
getCustomClass(string $class)

If a class has been overloaded, get the class name it has been overloaded with – otherwise return the class name

Parameters

string$classthe class to check

Return Value

stringthe class that would be created if you called @link Object::create() with the class

in SS_Object at line 396

static any
static_lookup($class, $name, null $default = null)

Get the value of a static property of a class, even in that property is declared protected (but not private),
without any inheritance, merging or parent lookup if it doesn’t exist on the given class.

Parameters

$class
  • The class to get the static from
$name
  • The property to get from the class
null$default
  • The value to return if property doesn’t exist on class

Return Value

any
  • The value of the static property $name on class $class, or $default if that property is not
    defined

in SS_Object at line 436

static
get_static($class, $name, $uncached = false)
deprecated

deprecated

Parameters

$class
$name
$uncached

in SS_Object at line 444

static
set_static($class, $name, $value)
deprecated

deprecated

Parameters

$class
$name
$value

in SS_Object at line 452

static
uninherited_static($class, $name, $uncached = false)
deprecated

deprecated

Parameters

$class
$name
$uncached

in SS_Object at line 460

static
combined_static($class, $name, $ceiling = false)
deprecated

deprecated

Parameters

$class
$name
$ceiling

in SS_Object at line 470

static
addStaticVars($class, $properties, $replace = false)
deprecated

deprecated

Parameters

$class
$properties
$replace

in SS_Object at line 478

static
add_static_var($class, $name, $value, $replace = false)
deprecated

deprecated

Parameters

$class
$name
$value
$replace

in SS_Object at line 494

static
has_extension(string $classOrExtension, string $requiredExtension = null, boolean $strict = false)

Return TRUE if a class has a specified extension.

This supports backwards-compatible format (static Object::has_extension($requiredExtension))
and new format ($object->has_extension($class, $requiredExtension))

Parameters

string$classOrExtensionif 1 argument supplied, the class name of the extension to
check for; if 2 supplied, the class name to test
string$requiredExtensionused only if 2 arguments supplied
boolean$strictif the extension has to match the required extension and not be a subclass

in SS_Object at line 536

static
add_extension(string $classOrExtension, string $extension = null)

Add an extension to a specific class.

The preferred method for adding extensions is through YAML config,
since it avoids autoloading the class, and is easier to override in
more specific configurations.

As an alternative, extensions can be added to a specific class
directly in the @link Object::$extensions array.
See @link SiteTree::$extensions for examples.
Keep in mind that the extension will only be applied to new
instances, not existing ones (including all instances created through @link singleton()).

Parameters

string$classOrExtensionClass that should be extended – has to be a subclass of @link Object
string$extensionSubclass of @link Extension with optional parameters
as a string, e.g. “Versioned” or “Translatable(‘Param’)”

See also

http://doc.silverstripe.org/framework/en/trunk/reference/dataextension

in SS_Object at line 594

static
remove_extension(string $extension)

Remove an extension from a class.

Keep in mind that this won’t revert any datamodel additions
of the extension at runtime, unless its used before the
schema building kicks in (in your _config.php).
Doesn’t remove the extension from any @link Object
instances which are already created, but will have an
effect on new extensions.
Clears any previously created singletons through @link singleton()
to avoid side-effects from stale extension information.

Parameters

string$extensionClassname of an @link Extension subclass, without parameters

in SS_Object at line 633

static array
get_extensions(string $class, bool $includeArgumentString = false)

Parameters

string$class
bool$includeArgumentStringInclude the argument string in the return array,
FALSE would return array(“Versioned”), TRUE returns array(“Versioned(‘Stage’,’Live’)”).

Return Value

arrayNumeric array of either @link DataExtension classnames,
or eval’ed classname strings with constructor arguments.

in SS_Object at line 655

static
get_extra_config_sources($class = null)

Parameters

$class

in GDBackend at line 38


__construct($filename = null, $args = array())

Parameters

$filename
$args

in SS_Object at line 725

mixed
__call(string $method, array $arguments)

Attemps to locate and call a method dynamically added to a class at runtime if a default cannot be located

You can add extra methods to a class using @link Extensions, @link Object::createMethod() or
@link Object::addWrapperMethod()

Parameters

string$method
array$arguments

Return Value

mixed

in SS_Object at line 792

bool
hasMethod(string $method)

Return TRUE if a method exists on this object

This should be used rather than PHP’s inbuild method_exists() as it takes into account methods added via
extensions

Parameters

string$method

Return Value

bool

in SS_Object at line 802

array
allMethodNames(bool $custom = false)

Return the names of all the methods available on this object

Parameters

bool$custominclude methods added dynamically at runtime

Return Value

array

in SS_Object at line 959


stat($name, $uncached = false)

Parameters

$name
$uncached

See also

SS_Object::get_static()

in SS_Object at line 966


set_stat($name, $value)

Parameters

$name
$value

See also

SS_Object::set_static()

in SS_Object at line 973


uninherited($name)

Parameters

$name

See also

SS_Object::uninherited_static()

in SS_Object at line 987

bool
exists()

Return true if this object “exists” i.e. has a sensible value

This method should be overriden in subclasses to provide more context about the classes state. For example, a
@link DataObject class could return false when it is deleted from the database

Return Value

bool

in SS_Object at line 994

string
parentClass()

Return Value

stringthis classes parent class

in SS_Object at line 1004

bool
is_a(string $class)

Check if this class is an instance of a specific class, or has that class as one of its parents

Parameters

string$class

Return Value

bool

in SS_Object at line 1011

string
__toString()

Return Value

stringthe class name

in SS_Object at line 1026

mixed
invokeWithExtensions(string $method, mixed $argument = null)

Calls a method if available on both this object and all applied @link Extensions, and then attempts to merge
all results into an array

Parameters

string$methodthe method name to call
mixed$argumenta single argument to pass

Return Value

mixed

in SS_Object at line 1054

array
extend(string $method, mixed $a1 = null, mixed $a2 = null, mixed $a3 = null, mixed $a4 = null, mixed $a5 = null, mixed $a6 = null, mixed $a7 = null)

Run the given function on all of this object’s extensions. Note that this method originally returned void, so if
you wanted to return results, you’re hosed

Currently returns an array, with an index resulting every time the function is called. Only adds returns if
they’re not NULL, to avoid bogus results from methods just defined on the parent extension. This is important for
permission-checks through extend, as they use min() to determine if any of the returns is FALSE. As min() doesn’t
do type checking, an included NULL return would fail the permission checks.

The extension methods are defined during @link __construct() in @link defineMethods().

Parameters

string$methodthe name of the method to call on each extension
mixed$a1
mixed$a2
mixed$a3
mixed$a4
mixed$a5
mixed$a6
mixed$a7

Return Value

array

in SS_Object at line 1093

Extension
getExtensionInstance(string $extension)

Get an extension instance attached to this object by name.

Parameters

string$extension

Return Value

Extension

in SS_Object at line 1111

bool
hasExtension(string $extension)

Returns TRUE if this object instance has a specific extension applied
in @link $extension_instances. Extension instances are initialized
at constructor time, meaning if you use @link add_extension()
afterwards, the added extension will just be added to new instances
of the extended class. Use the static method @link has_extension()
to check if a class (not an instance) has a specific extension.

Caution: Don’t use singleton()->hasExtension() as it will
give you inconsistent results based on when the singleton was first
accessed.

Parameters

string$extensionClassname of an @link Extension subclass without parameters

Return Value

bool

in SS_Object at line 1122

array
getExtensionInstances()

Get all extension instances for this specific object instance.

See @link get_extensions() to get all applied extension classes
for this class (not the instance).

Return Value

arrayMap of @link DataExtension instances, keyed by classname.

in SS_Object at line 1138

mixed
cacheToFile(string $method, int $lifetime = 3600, string $ID = false, array $arguments = array())

Cache the results of an instance method in this object to a file, or if it is already cache return the cached
results

Parameters

string$methodthe method name to cache
int$lifetimethe cache lifetime in seconds
string$IDcustom cache ID to use
array$argumentsan optional array of arguments

Return Value

mixedthe cached data

in SS_Object at line 1167


clearCache($method, $ID = false, $arguments = array())

Clears the cache for the given cacheToFile call

Parameters

$method
$ID
$arguments

at line 620

static
set_default_quality(quality $quality)
deprecated

deprecated

4.0Use the “GDBackend.default_quality” config setting instead

Parameters

quality$qualityint A number from 0 to 100, 100 being the best quality.

in GDBackend at line 83

void
setImageResource(mixed $resource)

setImageResource

Set the backend-specific resource handling the manipulations. Replaces Image::setGD()

Parameters

mixed$resource

Return Value

void

in GDBackend at line 92


setGD($gd)
deprecated

deprecated

Parameters

$gd

in GDBackend at line 97

mixed
getImageResource()

getImageResource

Get the backend-specific resource handling the manipulations. Replaces Image::getGD()

Return Value

mixed

in GDBackend at line 104


getGD()
deprecated

deprecated

in GDBackend at line 114

boolean
imageAvailable(string $filename, string $manipulation)

Parameters

string$filename
string$manipulation

Return Value

boolean

in GDBackend at line 127

boolean
checkAvailableMemory(string $filename)

Check if we’ve got enough memory available for resampling this image. This check is rough,
so it will not catch all images that are too large – it also won’t work accurately on large,
animated GIFs as bits per pixel can’t be calculated for an animated GIF with a global color
table.

Parameters

string$filename

Return Value

boolean

in GDBackend at line 155

boolean
failedResample($filename, $manipulation)

Check if this image has previously crashed GD when attempting to open it – if it’s opened
successfully, the manipulation’s cache key is removed.

Parameters

$filename
$manipulation

Return Value

boolean

in GDBackend at line 163

void
setQuality(int $quality)

Set the image quality, used when saving JPEGs.

Parameters

int$quality

Return Value

void

in GDBackend at line 170

Image_Backend
croppedResize(int $width, int $height)

Resize an image to cover the given width/height completely, and crop off any overhanging edges.

Parameters

int$width
int$height

Return Value

Image_Backend

in GDBackend at line 222


fittedResize($width, $height)

Resizes the image to fit within the given region.

Behaves similarly to paddedResize but without the padding.

Parameters

$width
$height

in GDBackend at line 235

boolean
hasImageResource()

hasImageResource

Return Value

boolean

in GDBackend at line 242


hasGD()
deprecated

deprecated

in GDBackend at line 252

Image_Backend
resize(int $width, int $height)

Resize an image, skewing it as necessary.

Parameters

int$width
int$height

Return Value

Image_Backend

in GDBackend at line 291

GD
rotate(angle $angle)

Rotates image by given angle.

Parameters

angle$angle

Return Value

GD

in GDBackend at line 314

GD
rotatePixelByPixel(angle $angle)

Rotates image by given angle. It’s slow because makes it pixel by pixel rather than
using built-in function. Used when imagerotate function is not available(i.e. Ubuntu)

Parameters

angle$angle

Return Value

GD

in GDBackend at line 359

GD
crop(top $top, left $left, width $width, height $height)

Crop’s part of image.

Parameters

top$topy position of left upper corner of crop rectangle
left$leftx position of left upper corner of crop rectangle
width$widthrectangle width
height$heightrectangle height

Return Value

GD

in GDBackend at line 383

integer
getWidth()

Method return width of image.

Return Value

integerwidth.

in GDBackend at line 393

integer
getHeight()

Method return height of image.

Return Value

integerheight

in GDBackend at line 400

Image_Backend
resizeByWidth(int $width)

Resize an image by width. Preserves aspect ratio.

Parameters

int$width

Return Value

Image_Backend

in GDBackend at line 409

Image_Backend
resizeByHeight(int $height)

Resize an image by height. Preserves aspect ratio

Parameters

int$height

Return Value

Image_Backend

in GDBackend at line 419

Image_Backend
resizeRatio($maxWidth, $maxHeight, $useAsMinimum = false)

Resize the image by preserving aspect ratio. By default, it will keep the image inside the maxWidth
and maxHeight. Passing useAsMinimum will make the smaller dimension equal to the maximum corresponding dimension

Parameters

$maxWidth
$maxHeight
$useAsMinimum

Return Value

Image_Backend

in GDBackend at line 432

static
color_web2gd($image, $webColor, $transparencyPercent)

Parameters

$image
$webColor
$transparencyPercent

in GDBackend at line 456

Image_Backend
paddedResize($width, $height, $backgroundColor = "FFFFFF", transparencyPercent $transparencyPercent)

Resize to fit fully within the given box, without resizing. Extra space left around
the image will be padded with the background color.

Parameters

$width
$height
$backgroundColor
transparencyPercent$transparencyPercent

Return Value

Image_Backend

in GDBackend at line 519


greyscale($R = 299, $G = 587, $B = 114, $brightness = 100)

Make the image greyscale.

Default color weights are based on standard BT.601 (those used in PAL, NTSC and many software packages, also see
https://en.wikipedia.org/wiki/Grayscale#Luma_coding_in_video_systems )

$R = red weight, defaults to 299
$G = green weight, defaults to 587
$B = blue weight, defaults to 114
$brightness = brightness in percentage, defaults to 100

Parameters

$R
$G
$B
$brightness

in GDBackend at line 550


makeDir($dirname)

Parameters

$dirname

in GDBackend at line 555

void
writeTo($filename)

writeTo

Parameters

$filename

Return Value

void

in GDBackend at line 598

void
onBeforeDelete( Image $frontend)

Parameters

Image $frontend

Return Value

void
Generated by Sami, the API Documentation Generator .