public class ImageUtils
extends java.lang.Object
Constructor and Description |
---|
ImageUtils() |
Modifier and Type | Method and Description |
---|---|
java.awt.image.BufferedImage |
compositeImages(java.awt.image.BufferedImage src,
int dx,
int dy,
java.awt.image.BufferedImage overlay)
Overlay 2 images, with the given offset dx,dy for the overlay image.
|
void |
createCompositeImage(java.lang.String imageDataUri,
int dx,
int dy,
java.lang.String svgImageData,
java.io.OutputStream output)
Convenience method that overlays a SVG image on top of a base64 encoded image and writes the output to the output stream.
|
java.awt.image.BufferedImage |
toImageFromDataURI(java.lang.String imageData)
Given the Base64 encoded image URI (data:image/png;base64,iVBORw0KG...) create a BufferedImage
|
java.awt.image.BufferedImage |
toImageFromSVG(java.lang.String svg)
Given the SVG xml, create a BufferedImage.
|
public java.awt.image.BufferedImage toImageFromDataURI(java.lang.String imageData) throws java.io.IOException
imageData
- java.io.IOException
public java.awt.image.BufferedImage toImageFromSVG(java.lang.String svg) throws java.lang.Exception
svg
- TranscoderException
java.io.IOException
java.lang.Exception
public java.awt.image.BufferedImage compositeImages(java.awt.image.BufferedImage src, int dx, int dy, java.awt.image.BufferedImage overlay)
src
- dx
- dy
- overlay
- public void createCompositeImage(java.lang.String imageDataUri, int dx, int dy, java.lang.String svgImageData, java.io.OutputStream output) throws java.lang.Exception
imageDataUri
- dx
- dy
- svgImageData
- output
- java.io.IOException
TranscoderException
java.lang.Exception