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, setExtension
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContentType, getExtension
protected TransformedImage(BufferedImage bufferedImage, String outputFormat)
protected TransformedImage(Image image, String outputFormat) throws IOException
image
- an imageoutputFormat
- the output format required e.g. "png"IOException
public InputStream getInputStream() throws IOException
Resource
getInputStream
in interface Resource
IOException
public byte[] getBytes() throws IOException
Resource
getBytes
in interface Resource
IOException
public ByteString getByteString() throws IOException
Resource
getByteString
in interface Resource
IOException
public long getSize() throws IOException
Resource
getSize
in interface Resource
IOException
public Integer getWidth()
ClarifiedImage
getWidth
in interface ClarifiedImage
public Integer getHeight()
ClarifiedImage
getHeight
in interface ClarifiedImage
public 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