Class BitmapBytesTranscoder

  • All Implemented Interfaces:
    ResourceTranscoder<android.graphics.Bitmap,​byte[]>

    public class BitmapBytesTranscoder
    extends java.lang.Object
    implements ResourceTranscoder<android.graphics.Bitmap,​byte[]>
    An ResourceTranscoder that converts Bitmaps into byte arrays using (android.graphics.Bitmap.CompressFormat, int, java.io.OutputStream).
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Resource<byte[]> transcode​(Resource<android.graphics.Bitmap> toTranscode, Options options)
      Transcodes the given resource to the new resource type and returns the new resource.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BitmapBytesTranscoder

        public BitmapBytesTranscoder()
      • BitmapBytesTranscoder

        public BitmapBytesTranscoder​(@NonNull
                                     android.graphics.Bitmap.CompressFormat compressFormat,
                                     int quality)
    • Method Detail

      • transcode

        @Nullable
        public Resource<byte[]> transcode​(@NonNull
                                          Resource<android.graphics.Bitmap> toTranscode,
                                          @NonNull
                                          Options options)
        Description copied from interface: ResourceTranscoder
        Transcodes the given resource to the new resource type and returns the new resource.
        Specified by:
        transcode in interface ResourceTranscoder<android.graphics.Bitmap,​byte[]>
        Parameters:
        toTranscode - The resource to transcode.