Groovy Documentation

src.groovy.pl.burningice.plugins.image.engines.scale
Class JaiAccurateScaleEngine

java.lang.Object
  src.groovy.pl.burningice.plugins.image.engines.scale.JaiScaleEngine
      src.groovy.pl.burningice.plugins.image.engines.scale.JaiApproximateScaleEngine
          src.groovy.pl.burningice.plugins.image.engines.scale.JaiAccurateScaleEngine

class JaiAccurateScaleEngine
extends JaiApproximateScaleEngine

Class allows to scale image with accurate width and height. Result image will contain exact width and height gave by user, if original size of image not fit to user width and height, image will be scaled to shortest side and cropped on center

author:
Pawel Gdula


Property Summary
private static def SIZE_CORRECTION

Sometimes scale of image is lowered by 1px and when there is crop action, exception is risen because crop region not match.

 
Constructor Summary
JaiAccurateScaleEngine()

 
Method Summary
protected def scaleImage(def image, def width, def height)

 
Methods inherited from class JaiApproximateScaleEngine
resize, scaleImage
 
Methods inherited from class JaiScaleEngine
execute, scaleImage
 

Property Detail

SIZE_CORRECTION

private static final def SIZE_CORRECTION
Sometimes scale of image is lowered by 1px and when there is crop action, exception is risen because crop region not match. If wee add 1px to requested size, it will correct error
var:
int


 
Constructor Detail

JaiAccurateScaleEngine

JaiAccurateScaleEngine()


 
Method Detail

scaleImage

protected def scaleImage(def image, def width, def height)
see:
JaiScaleEngine#scaleImage
overwrite:


 

Groovy Documentation