Groovy Documentation

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

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

class JaiApproximateScaleEngine
extends JaiScaleEngine

Class allows to scale image with approximate width and height Result image will not contain exact width and height given by user if there will be image deformation

author:
Pawel Gdula


Property Summary
protected def resizeByScale

Resize option for scale > 1

protected def resizeBySubsampleAverage

Resize option for scale <= 1

 
Constructor Summary
JaiApproximateScaleEngine()

 
Method Summary
protected def resize(def scale)

We provide two types of image resize to eliminate situation when scale is > 1, for such action SubsampleAverage throw exception For this situation we resize image by "scale"

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

 
Methods inherited from class JaiScaleEngine
execute, scaleImage
 

Property Detail

resizeByScale

protected def resizeByScale
Resize option for scale > 1
param:
scale Scale parameter
param:
image Image to scale
return:
RenderedOp


resizeBySubsampleAverage

protected def resizeBySubsampleAverage
Resize option for scale <= 1
param:
scale Scale parameter
param:
image Image to scale
return:
RenderedOp


 
Constructor Detail

JaiApproximateScaleEngine

JaiApproximateScaleEngine()


 
Method Detail

resize

protected def resize(def scale)
We provide two types of image resize to eliminate situation when scale is > 1, for such action SubsampleAverage throw exception For this situation we resize image by "scale"
param:
Float scale
return:
Closure


scaleImage

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


 

Groovy Documentation