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

Latest news

  • ProcessWire Weekly #518
    The 518th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
    Weekly.pw / 13 April 2024
  • ProFields Table Field with Actions support
    This week we have some updates for the ProFields table field (FieldtypeTable). These updates are primarily focused on adding new tools for the editor to facilitate input and management of content in a table field.
    Blog / 12 April 2024
  • Subscribe to weekly ProcessWire news

“Indeed, if ProcessWire can be considered as a CMS in its own right, it also offers all the advantages of a CMF (Content Management Framework). Unlike other solutions, the programmer is not forced to follow the proposed model and can integrate his/her ways of doing things.” —Guy Verville, Spiria Digital Inc.