Class ImageResizer
- java.lang.Object
-
- org.nuxeo.ecm.platform.picture.magick.MagickExecutor
-
- org.nuxeo.ecm.platform.picture.magick.utils.ImageResizer
-
public class ImageResizer extends MagickExecutor
Unit command to extract a simplified view of a JPEG file using ImageMagick = extract the needed picture information to reach the target definition level- Author:
- tiry
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_JEPG_DIMENSION
-
Constructor Summary
Constructors Constructor Description ImageResizer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ImageInfo
resize(String inputFile, String outputFile, int targetWidth, int targetHeight, int targetDepth)
static Point
scaleToMax(int width, int height, int max)
Adapts width and height to a max conserving ratio.-
Methods inherited from class org.nuxeo.ecm.platform.picture.magick.MagickExecutor
execCommand
-
-
-
-
Field Detail
-
MAX_JEPG_DIMENSION
public static final int MAX_JEPG_DIMENSION
- Since:
- 10.3
- See Also:
- Constant Field Values
-
-
Method Detail
-
resize
public static ImageInfo resize(String inputFile, String outputFile, int targetWidth, int targetHeight, int targetDepth) throws CommandNotAvailable, CommandException
- Throws:
CommandNotAvailable
CommandException
-
scaleToMax
public static Point scaleToMax(int width, int height, int max)
Adapts width and height to a max conserving ratio.- Returns:
- new Point to scale or the original one if none is > max.
- Since:
- 10.3
-
-