@Embeddable public class EmbeddableImage extends Object
| Constructor and Description |
|---|
EmbeddableImage()
Default constructor
|
EmbeddableImage(byte[] image)
Constructor that receives the byte array information
to initialize the image.
|
| Modifier and Type | Method and Description |
|---|---|
EmbeddableImage |
format(String newFormat)
Utility method that formats the image using the received format.
|
EmbeddableImage |
formatAndResize(String newFormat,
int width,
int height)
Utility method that formats and resize the image at the same time
delegating in
format and resize. |
String |
getBase64()
Utility method that obtains the
Image in base64 format. |
String |
getFormat()
Utility method that obtains the format of the uploaded image using the
byte array.
|
byte[] |
getImage()
Getter that returns the image byte array.
|
EmbeddableImage |
resize(int width,
int height)
Utility method that resizes the image using the received width and height
|
void |
setImage(byte[] image)
Setter that sets the bytes of the image.
|
String |
toString()
toString method that returns the String representation of this image.
|
public EmbeddableImage()
public EmbeddableImage(byte[] image)
image - public byte[] getImage()
public void setImage(byte[] image)
image - public String getFormat()
public String getBase64()
Image in base64 format.public EmbeddableImage resize(int width, int height)
width - The new width of the imageheight - The new height of the imagepublic EmbeddableImage format(String newFormat)
newFormat - String that indicates the new format of the image.public EmbeddableImage formatAndResize(String newFormat, int width, int height)
format and resize.newFormat - The new format to usewidth - The new width of the imageheight - The new height of the imagepublic String toString()
getFormat() and the getBase64() methods to obtain
the complete representation of the image.Copyright © 2018 DISID Corporation. All rights reserved.