public class BitmapEncoder extends Object implements ResourceEncoder<Bitmap>
ResourceEncoder that writes Bitmaps
 to OutputStreams.
  Bitmaps that return true from
 ()} are written using
 Bitmap.CompressFormat.PNG
 to preserve alpha and all other bitmaps are written using
 Bitmap.CompressFormat.JPEG. 
| Modifier and Type | Field and Description | 
|---|---|
| static Option<Bitmap.CompressFormat> | COMPRESSION_FORMATAn  Bitmap.CompressFormatoption used as the format to encode
 theBitmap. | 
| static Option<Integer> | COMPRESSION_QUALITYAn integer option between 0 and 100 that is used as the compression quality. | 
| Constructor and Description | 
|---|
| BitmapEncoder() | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | encode(Resource<Bitmap> resource,
      File file,
      Options options)Writes the given data to the given output stream and returns True if the write completed
 successfully and should be committed. | 
| EncodeStrategy | getEncodeStrategy(Options options) | 
public static final Option<Integer> COMPRESSION_QUALITY
Defaults to 90.
public static final Option<Bitmap.CompressFormat> COMPRESSION_FORMAT
Bitmap.CompressFormat option used as the format to encode
 the Bitmap.
  Defaults to Bitmap.CompressFormat.JPEG for images without alpha
 and Bitmap.CompressFormat.PNG for images with alpha. 
public boolean encode(Resource<Bitmap> resource, File file, Options options)
Encoderpublic EncodeStrategy getEncodeStrategy(Options options)
getEncodeStrategy in interface ResourceEncoder<Bitmap>