ImageSizerEngine class

ImageSizer Engine Module (Abstract)

Copyright (C) 2016-2019 by Horst Nogajski and Ryan Cramer This file licensed under Mozilla Public License v2.0 http://mozilla.org/MPL/2.0


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

Show class?     Show args?       Only hookable?    

Common

NameReturnSummary 
ImageSizerEngine::convertToGreyscale()
boolConvert image to greyscale 
ImageSizerEngine::convertToSepia()
boolConvert image to sepia 
ImageSizerEngine::croppingValue($cropping)
string bool arrayGiven an unknown cropping value, return the validated internal representation of it 
ImageSizerEngine::croppingValueStr($cropping)
stringGiven an unknown cropping value, return the string representation of it 
ImageSizerEngine::flipBoth()
boolFlip both vertically and horizontally 
ImageSizerEngine::flipHorizontal()
boolFlip horizontally 
ImageSizerEngine::flipVertical()
boolFlip vertically 
ImageSizerEngine::get(string $key)
mixed nullGet a property 
ImageSizerEngine::getConfigData()
arrayGet module config data 
ImageSizerEngine::getEngineInfo()
arrayGet array of information about this engine 
ImageSizerEngine::getExtension()
stringReturn the file extension 
ImageSizerEngine::getFilename()
stringReturn the filename 
ImageSizerEngine::getHeight()
intReturn the image height 
ImageSizerEngine::getImageType()
string nullReturn the image type constant 
ImageSizerEngine::getLibraryVersion()
stringGet library version string 
ImageSizerEngine::getModified()
boolGet whether the image was modified 
ImageSizerEngine::getModuleConfigInputfields(InputfieldWrapper $inputfields)
NoneModule configuration 
ImageSizerEngine::getOptions()
arrayReturn an array of the current options 
ImageSizerEngine::getSupportedFormats()
arrayGet an array of image file formats this ImageSizerModule can use as source or target 
ImageSizerEngine::getWidth()
intReturn the image width 
ImageSizerEngine::isModified()
boolWas the image modified? 
ImageSizerEngine::prepare(string $filename)
NonePrepare the ImageSizer (this should be the first method you call) 
ImageSizerEngine::resize(int $finalWidth, int $finalHeight)
boolResize the image 
ImageSizerEngine::rotate(int $degrees)
boolJust rotate image by number of degrees
Can also be used as property: ImageSizerEngine::rotate
 
ImageSizerEngine::setAutoRotation()
selfTurn on/off auto rotation 
ImageSizerEngine::setConfigData(array $data)
NoneSet module config data for ConfigurableModule interface 
ImageSizerEngine::setCropExtra(array $value)
selfSet values for cropExtra rectangle, which enables cropping before resizing 
ImageSizerEngine::setCropping()
selfTurn on/off cropping and/or set cropping direction 
ImageSizerEngine::setDefaultGamma()
selfSet default gamma value: 0.5 - 4.0 | -1 
ImageSizerEngine::setFlip($flip)
selfSet flip 
ImageSizerEngine::setHidpi()
selfEnable hidpi mode? 
ImageSizerEngine::setInterlace()
selfTurn on/off interlace 
ImageSizerEngine::setModified(bool $modified)
selfSet whether the image was modified 
ImageSizerEngine::setOptions(array $options)
selfAlternative to the above set* functions where you specify all in an array 
ImageSizerEngine::setQuality(int $n)
selfSet the image quality 1-100, where 100 is highest quality 
ImageSizerEngine::setRotate($degrees)
selfSet rotation degrees 
ImageSizerEngine::setScale(float $scale)
selfSet scale for hidpi (2.0=hidpi, 1.0=normal, or other value if preferred) 
ImageSizerEngine::setSharpening(mixed $value)
selfSet sharpening value: blank (for none), soft, medium, or strong 
ImageSizerEngine::setTimeLimit()
selfSet a time limit for manipulating one image (default is 30) 
ImageSizerEngine::setUpscaling()
selfTurn on/off upscaling 
ImageSizerEngine::setUseUSM()
selfToggle on/off the usage of USM algorithm for sharpening 
ImageSizerEngine::setWebpAdd(bool $webpAdd)
selfSet flag to also create a webp file or not 
ImageSizerEngine::setWebpOnly($value)
selfSet flag to only create a webp file 
ImageSizerEngine::setWebpQuality(int $n)
selfSet the image quality 1-100 for WebP output, where 100 is highest quality 
ImageSizerEngine::sharpeningValueStr($value)
stringGiven an unknown sharpening value, return the string representation of it 
ImageSizerEngine::supported()
boolIs this ImageSizer class ready only means: does the server / system provide all Requirements! 
ImageSizerEngine::writeBackIPTC(string $filename)
bool nullDefault IPTC Handling 

Properties

NameReturnSummaryDefault
ImageSizerEngine::autoRotation bool 
ImageSizerEngine::cropping array string bool 
ImageSizerEngine::defaultGamma float 
ImageSizerEngine::enginePriority int Priority for use among other ImageSizerEngine modules (0=disabled, 1=first, 2=second, 3=and so on) 
ImageSizerEngine::flip string 
ImageSizerEngine::interlace bool 
ImageSizerEngine::quality int 
ImageSizerEngine::scale float 
ImageSizerEngine::sharpening string 
ImageSizerEngine::upscaling bool 
ImageSizerEngine::useUSM bool 
ImageSizerEngine::webpAdd bool 
ImageSizerEngine::webpOnly bool null 
ImageSizerEngine::webpQuality int 
ImageSizerEngine::webpResult bool null 

Additional methods and properties

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

API reference based on ProcessWire core version 3.0.251