Class Rotate

java.lang.Object
com.cloudinary.android.preprocess.Rotate
All Implemented Interfaces:
com.cloudinary.android.preprocess.Preprocess<android.graphics.Bitmap>

public class Rotate
extends java.lang.Object
implements com.cloudinary.android.preprocess.Preprocess<android.graphics.Bitmap>
Preprocess for rotating. Send an instance to PreprocessChain.addStep(Preprocess) to rotate an image.
  • Constructor Summary

    Constructors 
    Constructor Description
    Rotate​(int rotationAngle)  
  • Method Summary

    Modifier and Type Method Description
    android.graphics.Bitmap execute​(android.content.Context context, android.graphics.Bitmap resource)
    Execute the preprocessing phase.

    Methods inherited from class java.lang.Object

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

    • Rotate

      public Rotate​(int rotationAngle)
  • Method Details

    • execute

      public android.graphics.Bitmap execute​(android.content.Context context, android.graphics.Bitmap resource)
      Execute the preprocessing phase. This will rotate the image by the rotation angle property. If the rotation angle is a multiple of 360, then the original resource bitmap will be returned.
      Specified by:
      execute in interface com.cloudinary.android.preprocess.Preprocess<android.graphics.Bitmap>
      Parameters:
      context - Android context.
      resource - The bitmap to rotate.
      Returns:
      The rotated bitmap.