Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

GD API

mikealmond edited this page · 2 revisions

This page is meant to provide a quick reference to all the public functions available when using the GD implementation of the library. For more information on how to use the functions, you can either head over to the usage page or check out the api docs

API Functions

  • adaptiveResize ($width, $height)
  • adaptiveResizePercent($width, $height, $percent = 50)
  • adaptiveResizeQuadrant ($width, $height, $quadrant = 'T|B|C|L|R')
  • crop ($startX, $startY, $cropWidth, $cropHeight)
  • cropFromCenter ($cropWidth, $cropHeight = null)
  • pad ($width, $height, $color=array(255, 255, 255))
  • resize ($maxWidth, $maxHeight)
  • resizePercent ($percent)
  • rotateImage ($direction = 'CW')
  • rotateImageNDegrees ($degrees)
  • save ($fileName, $format = 'GIF|JPG|PNG')
  • show ($rawData = false)

Getters / Setters

  • getCurrentDimensions ()
  • getErrorMessage ()
  • getFileName ()
  • getFormat ()
  • getHasError ()
  • getImportedFunctions ()
  • getMaxHeight ()
  • getMaxWidth ()
  • getNewDimensions ()
  • getNewImage ()
  • getOldImage ()
  • getOptions ()
  • getPercent ()
  • getWorkingImage ()
  • setCurrentDimensions ($currentDimensions)
  • setErrorMessage ($errorMessage)
  • setFileName ($fileName)
  • setFormat ($format)
  • setHasError ($hasError)
  • setMaxHeight ($maxHeight)
  • setMaxWidth ($maxWidth)
  • setNewDimensions ($newDimensions)
  • setNewImage ($newImage)
  • setOldImage($oldImage)
  • setOptions ($options)
  • setPercent ($percent)
  • setWorkingImage ($workingImage)
Something went wrong with that request. Please try again.