Package 

Class Crop

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

    
    public class Crop
     implements Preprocess<Bitmap>
                        

    Preprocess for cropping. Send an instance to addStep to crop an image. Points must form a diagonal within the bounds of the image. If the points form the same diagonal size as the original image, it will be returned unchanged.

    • Constructor Summary

      Constructors 
      Constructor Description
      Crop(Point p1, Point p2) Create a new crop preprocess.
    • Method Summary

      Modifier and Type Method Description
      Bitmap execute(Context context, Bitmap resource) Execute the preprocessing phase.
      • Methods inherited from class com.cloudinary.android.preprocess.Preprocess

        execute
      • Methods inherited from class java.lang.Object

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

      • Crop

        Crop(Point p1, Point p2)
        Create a new crop preprocess.
        Parameters:
        p1 - First point that form the diagonal.
        p2 - Second point that form the diagonal.
    • Method Detail

      • execute

         Bitmap execute(Context context, Bitmap resource)

        Execute the preprocessing phase. This will crop the image if needed, making sure that the points form adiagonal within the bounds of the bitmap.

        Parameters:
        context - Android context
        resource - The Bitmap to crop