ImageSizer class

Located in file /wire/core/ImageSizer.php

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the ImageSizer class also inherits all the methods and properties of: Wire.

Show class?             Show args?        

Common

NameReturnSummary 
convertToGreyscale()
boolConvert image to greyscale (black and white) 
convertToSepia()
boolConvert image to sepia tone 
croppingValue($cropping)
string boolGiven an unknown cropping value, return the validated internal representation of it 
croppingValueStr($cropping)
stringGiven an unknown cropping value, return the string representation of it 
flipBoth()
boolFlip both vertically and horizontally 
flipHorizontal()
boolFlip image horizontally 
flipVertical()
boolFlip image vertically 
getEngine()
ImageSizerEngine nullGet the current ImageSizerEngine 
getEngineInfo()
arrayGet array of information for all ImageSizer engines (or optionally a specific ImageSizer engine) 
getEngines()
arrayGet array of all available ImageSizer engine names in order of priority 
getExtension()
(nothing) 
getFailedEngineNames()
(nothing) 
getFilename()
(nothing) 
getHeight()
(nothing) 
getImageInfo()
string arrayImageInformation from Image Inspector in short form or full RawInfoData 
getImageType()
(nothing) 
getOptions()
(nothing) 
getWidth()
(nothing) 
imageIsAnimatedGif(mixed $image)
bool nullCheck if GIF-image is animated or not ( 
imageIsRotated(mixed $image)
bool nullCheck orientation ( 
imageResetIPTC(mixed $image)
null boolPossibility to clean IPTC data, also for original images ( 
isModified()
(nothing) 
resize(int $targetWidth)
boolResize the image proportionally to the given width/height
rotate(int $degrees)
boolRotate image by given degrees 
setAutoRotation()
(nothing) 
setCropExtra($value)
(nothing) 
setCropping()
(nothing) 
setDefaultGamma()
(nothing) 
setFilename($filename)
$thisSet the filename 
setFlip($flip)
(nothing) 
setForceEngine($engineName)
$thisForce the use of a specific engine 
setHidpi()
(nothing) 
setModified($modified)
$thisSet whether a modification was made 
setOptions(array $options)
$thisSet multiple resize options 
setQuality($n)
(nothing) 
setRotate($degrees)
(nothing) 
setScale($scale)
(nothing) 
setSharpening($value)
(nothing) 
setTimeLimit()
(nothing) 
setUpscaling()
(nothing) 
setUseUSM()
(nothing) 
sharpeningValueStr($value)
stringGiven an unknown sharpening value, return the string representation of it 

Additional methods and properties

In addition to the methods and properties above, ImageSizer also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.244

“We were really happy to build our new portfolio website on ProcessWire! We wanted something that gave us plenty of control on the back-end, without any bloat on the front end - just a nice, easy to access API for all our content that left us free to design and build however we liked.” —Castus, web design agency in Sheffield, UK