public class AndroidImageHandler extends Object implements ImageHandler
Modifier and Type | Method and Description |
---|---|
static AndroidImageHandler |
getInstanceOf() |
boolean |
isMimeTypeWritable(String mimeType) |
void |
makeSmaller(Artwork artwork,
int size)
Resize image using Java 2D
|
void |
reduceQuality(Artwork artwork,
int maxSize)
Resize the image until the total size require to store the image is less than maxsize
|
void |
showReadFormats()
Show read formats
On Windows supports png/jpeg/bmp/gif
|
void |
showWriteFormats()
Show write formats
On Windows supports png/jpeg/bmp
|
byte[] |
writeImage(BufferedImage bi,
String mimeType)
Write buffered image as required format
|
byte[] |
writeImageAsPng(BufferedImage bi) |
public static AndroidImageHandler getInstanceOf()
public void reduceQuality(Artwork artwork, int maxSize) throws IOException
reduceQuality
in interface ImageHandler
artwork
- maxSize
- IOException
public void makeSmaller(Artwork artwork, int size) throws IOException
makeSmaller
in interface ImageHandler
artwork
- size
- IOException
public boolean isMimeTypeWritable(String mimeType)
isMimeTypeWritable
in interface ImageHandler
public byte[] writeImage(BufferedImage bi, String mimeType) throws IOException
writeImage
in interface ImageHandler
bi
- mimeType
- IOException
public byte[] writeImageAsPng(BufferedImage bi) throws IOException
writeImageAsPng
in interface ImageHandler
bi
- IOException
public void showReadFormats()
showReadFormats
in interface ImageHandler
public void showWriteFormats()
showWriteFormats
in interface ImageHandler
Copyright © 2005–2020 jthink.net. All rights reserved.