Class PicassoConfigTransformation

  • All Implemented Interfaces:
    com.squareup.picasso.Transformation

    
    public final class PicassoConfigTransformation
     implements Transformation
                        

    A Transformation for Picasso that ensures a loaded Bitmap has a specific configuration.

    This transformation copies the source bitmap to a new bitmap with the desired configuration and recycles the original. It's useful for enforcing a consistent bitmap format across loaded images.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Bitmap transform(Bitmap source) Transforms the source Bitmap to a new Bitmap with the specified configuration.
      String key()
      • Methods inherited from class java.lang.Object

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

      • PicassoConfigTransformation

        PicassoConfigTransformation(Bitmap.Config config)
    • Method Detail

      • transform

         Bitmap transform(Bitmap source)

        Transforms the source Bitmap to a new Bitmap with the specified configuration. The original bitmap is recycled after the copy is made.

        Parameters:
        source - The source Bitmap to transform.
        Returns:

        A new Bitmap with the specified configuration.