Package com.thingworx.utils
Class ImageUtilities
java.lang.Object
com.thingworx.utils.ImageUtilities
@ThingworxExtensionApiClass(since={6,6},
canInstantiate=true)
public final class ImageUtilities
extends Object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
cropAndResizeImage
(byte[] imageData, int x, int y, int cropWidth, int cropHeight, int width, int height) static byte[]
cropImage
(byte[] imageData, int x, int y, int cropWidth, int cropHeight) static byte[]
formatImage
(byte[] imageData) static byte[]
formatImage
(byte[] imageData, String mimeType) static byte[]
resizeImage
(byte[] imageData, int width, int height)
-
Constructor Details
-
ImageUtilities
public ImageUtilities()
-
-
Method Details
-
resizeImage
@ThingworxExtensionApiMethod(since={6,6}) public static byte[] resizeImage(byte[] imageData, int width, int height) throws Exception - Throws:
Exception
- If an error occurs
-
cropImage
@ThingworxExtensionApiMethod(since={6,6}) public static byte[] cropImage(byte[] imageData, int x, int y, int cropWidth, int cropHeight) throws Exception - Throws:
Exception
- If an error occurs
-
cropAndResizeImage
@ThingworxExtensionApiMethod(since={6,6}) public static byte[] cropAndResizeImage(byte[] imageData, int x, int y, int cropWidth, int cropHeight, int width, int height) throws Exception - Throws:
Exception
- If an error occurs
-
formatImage
@ThingworxExtensionApiMethod(since={7,4}) public static byte[] formatImage(byte[] imageData) throws Exception - Throws:
Exception
- If an error occurs
-
formatImage
@ThingworxExtensionApiMethod(since={8,4}) public static byte[] formatImage(byte[] imageData, String mimeType) throws Exception - Throws:
Exception
- If an error occurs
-