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.
|
Method Summary |
protected def
|
scaleImage(def image, def width, def height)
|
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
JaiAccurateScaleEngine
JaiAccurateScaleEngine()
-
scaleImage
protected def scaleImage(def image, def width, def height)
-
- see:
- JaiScaleEngine#scaleImage
- overwrite:
Groovy Documentation