public interface ImageConverter
The resulted image is not compatible with MicroUI Image API but it can be used by custom MicroUI extensions.
Modifier and Type | Method and Description |
---|---|
boolean |
generate(Image image,
OutputStream stream)
Converts the given image in the given output stream.
|
String |
getOutputFileExtension()
Returns the file extension to apply as suffix for the converted images.
|
boolean generate(Image image, OutputStream stream) throws IOException
If this method returns true, the image is considered as encoded even if no byte has been written into the output stream. In this case the final file size is 0.
If this method returns false, the image is not considered as encoded even if some bytes have been written into the output stream. In this case the written bytes are lost.
image
- the image to convertstream
- the output stream where write the encoded image.IOException
String getOutputFileExtension()