Package 

Class BitmapEncoder

  • All Implemented Interfaces:
    com.cloudinary.android.preprocess.ResourceEncoder

    
    public class BitmapEncoder
     implements ResourceEncoder<Bitmap>
                        

    Encodes the bitmap to a file. Allows configuration of quality and format.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public enum BitmapEncoder.Format
    • Constructor Summary

      Constructors 
      Constructor Description
      BitmapEncoder() Create a new bitmap encoder with the default specifications.
      BitmapEncoder(BitmapEncoder.Format format, int quality) Create a new bitmap encoder with the given specifications.
    • Method Summary

      Modifier and Type Method Description
      String encode(Context context, Bitmap resource) Encodes the given bitmap to a file using the supplied format and quality settings.If no configuration is supplied, default settings will be used.
      • Methods inherited from class com.cloudinary.android.preprocess.ResourceEncoder

        encode
      • Methods inherited from class java.lang.Object

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

      • BitmapEncoder

        BitmapEncoder()
        Create a new bitmap encoder with the default specifications.
      • BitmapEncoder

        BitmapEncoder(BitmapEncoder.Format format, int quality)
        Create a new bitmap encoder with the given specifications.
        Parameters:
        format - The format to encode the bitmap
        quality - The quality to use when encoding the bitmap
    • Method Detail

      • encode

         String encode(Context context, Bitmap resource)

        Encodes the given bitmap to a file using the supplied format and quality settings.If no configuration is supplied, default settings will be used.

        Parameters:
        context - Android context
        resource - The resource (after processing) to save to file.