Class StiImageHelper
java.lang.Object
com.stimulsoft.report.components.simplecomponents.StiImageHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intclamp(float value) static BufferedImagedecodeImage(byte[] bytes, StiRectangle rect) static BufferedImagedecodeImage(byte[] bytes, StiRectangle rect, double zoom) Decode raw image bytes to buffered imagestatic BufferedImagedecodeImage(String value, StiRectangle rect) static BufferedImagedecodeImage(String value, StiRectangle rect, double zoom) Decode String value to buffered imagestatic StiImagestatic StiImagegetImageFromObject(Object imageObject) static StringimageToBase64(BufferedImage image, StiImageFormat format) static byte[]imageToByteArray(BufferedImage image, StiImageFormat format) static int[]Convert image to raster byte arraystatic booleanisBmp(byte[] data) static booleanisEmf(byte[] data) static booleanisGif(byte[] data) static booleanisIcon(byte[] data) static booleanisImage(byte[] data) static booleanstatic booleanstatic booleanisJpeg(byte[] data) static booleanisMetafile(byte[] data) static booleanisPng(byte[] data) static booleanisSvg(byte[] data) static booleanisTiff(byte[] data) static booleanisWmf(byte[] data) static booleanisXml(byte[] data) static BufferedImagemakeGrayscaleImage(BufferedImage image) Make grayscale imagestatic BufferedImagemakeMonochromeImage(BufferedImage inputImage, StiMonochromeDitheringType ditheringType, int diffusionPower) static voidsaveWithDPI(BufferedImage image, File output, StiImageFormat format, int dpi, float compression) static voidsaveWithDPI(BufferedImage image, OutputStream output, StiImageFormat format, Integer dpi, float compression) static voidsetDPI(IIOMetadata metadata, Integer dpi)
-
Constructor Details
-
StiImageHelper
public StiImageHelper()
-
-
Method Details
-
saveWithDPI
public static void saveWithDPI(BufferedImage image, File output, StiImageFormat format, int dpi, float compression) -
saveWithDPI
public static void saveWithDPI(BufferedImage image, OutputStream output, StiImageFormat format, Integer dpi, float compression) -
setDPI
- Throws:
IIOInvalidTreeException
-
imageToRasterByteArray
Convert image to raster byte array- Parameters:
image-BufferedImage- Returns:
-
makeGrayscaleImage
Make grayscale image- Parameters:
image- sourceBufferedImage- Returns:
- grayscale
BufferedImage
-
makeMonochromeImage
public static BufferedImage makeMonochromeImage(BufferedImage inputImage, StiMonochromeDitheringType ditheringType, int diffusionPower) -
clamp
public static int clamp(float value) -
imageToByteArray
public static byte[] imageToByteArray(BufferedImage image, StiImageFormat format) throws IOException - Throws:
IOException
-
imageToBase64
-
decodeImage
- Throws:
IOException
-
decodeImage
public static BufferedImage decodeImage(String value, StiRectangle rect, double zoom) throws IOException Decode String value to buffered image- Throws:
IOException
-
decodeImage
- Throws:
IOException
-
decodeImage
public static BufferedImage decodeImage(byte[] bytes, StiRectangle rect, double zoom) throws IOException Decode raw image bytes to buffered image- Throws:
IOException
-
getImageFromObject
-
isXml
public static boolean isXml(byte[] data) -
isSvg
public static boolean isSvg(byte[] data) -
isIcon
public static boolean isIcon(byte[] data) -
isWmf
public static boolean isWmf(byte[] data) -
isEmf
public static boolean isEmf(byte[] data) -
isBmp
public static boolean isBmp(byte[] data) -
isJpeg
public static boolean isJpeg(byte[] data) -
isGif
public static boolean isGif(byte[] data) -
isPng
public static boolean isPng(byte[] data) -
isTiff
public static boolean isTiff(byte[] data) -
isMetafile
public static boolean isMetafile(byte[] data) -
isImage
-
isImage
public static boolean isImage(byte[] data) -
isImage
-
FromFile
- Throws:
FileNotFoundExceptionIOException
-