public final class ImageResolverHelper extends Object
Modifier | Constructor and Description |
---|---|
private |
ImageResolverHelper() |
Modifier and Type | Method and Description |
---|---|
static String |
resolveImageAsBase64(InputStream dataIs,
String mimeType,
int height,
int width,
int maxHeight,
int maxWidth)
Get an image's bytes encoded as base64, optionally resized.
|
private ImageResolverHelper()
public static final String resolveImageAsBase64(InputStream dataIs, String mimeType, int height, int width, int maxHeight, int maxWidth) throws IOException
dataIs
- an input stream on the image bytes.mimeType
- the image mime type.height
- the specified height. Ignored if negative.width
- the specified width. Ignored if negative.maxHeight
- the maximum image height. Ignored if height or width is specified.maxWidth
- the maximum image width. Ignored if height or width is specified.IOException
- if an error occurs.