+
+ /**
+ * @param inRotation initial rotation value (from exif)
+ */
+ public void setRotation(int inRotation)
+ {
+ if (inRotation >= 0 && inRotation <= 3) {
+ _rotation = inRotation;
+ }
+ }
+
+ /**
+ * Rotate the image by 90 degrees
+ * @param inRight true to rotate right, false for left
+ */
+ public void rotate(boolean inRight)
+ {
+ int dir = inRight?1:3;
+ _rotation = (_rotation + dir) % 4;
+ }
+
+ /**
+ * @return rotation status
+ */
+ public int getRotationDegrees()
+ {
+ return _rotation * 90;
+ }