public class TransformedImage extends AbstractImage implements ClarifiedImage, Cloneable, Serializable
| Modifier | Constructor and Description |
|---|---|
protected |
TransformedImage(BufferedImage bufferedImage,
String outputFormat) |
protected |
TransformedImage(Image image,
String outputFormat)
Create a transformed image (of the desired format) from an Image.
|
| Modifier and Type | Method and Description |
|---|---|
TransformedImage |
clone() |
BufferedImage |
getBufferedImage() |
byte[] |
getBytes()
Return the resource as a byte array.
|
ByteString |
getByteString()
Return the resource as a byte array's clone.
|
Integer |
getHeight()
Get the image height.
|
InputStream |
getInputStream()
Create an input stream for this resource.
|
long |
getSize()
Return size of the resource in bytes.
|
Integer |
getWidth()
Get the image width.
|
getContentType, getExtension, setContentType, setExtensionequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContentType, getExtensionprotected TransformedImage(BufferedImage bufferedImage, String outputFormat)
protected TransformedImage(Image image, String outputFormat) throws IOException
image - an imageoutputFormat - the output format required e.g. "png"IOExceptionpublic InputStream getInputStream() throws IOException
ResourcegetInputStream in interface ResourceIOExceptionpublic byte[] getBytes()
throws IOException
ResourcegetBytes in interface ResourceIOExceptionpublic ByteString getByteString() throws IOException
ResourcegetByteString in interface ResourceIOExceptionpublic long getSize()
throws IOException
ResourcegetSize in interface ResourceIOExceptionpublic Integer getWidth()
ClarifiedImagegetWidth in interface ClarifiedImagepublic Integer getHeight()
ClarifiedImagegetHeight in interface ClarifiedImagepublic BufferedImage getBufferedImage()
public TransformedImage clone()
Copyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries