0

In my application image editor I want to implement image brightness, contrast, sharpness, zooming, rotating, and save the image to my gallery.

Sathyajith Bhat
  • 21,321
  • 22
  • 95
  • 134
user1235450
  • 19
  • 1
  • 2

2 Answers2

1

If you are look for a place to start take a look at canvas.

http://developer.android.com/reference/android/graphics/Canvas.html

Icy Creature
  • 1,875
  • 2
  • 28
  • 53
0

The basic classes you need is Canvas, Bitmap and Matrix.

For example, to rotate and/or scale (zoom?) an image:

Matrix matrix = new Matrix();
matrix.postRotate(90);
matrix.setScale(scaleFloatX, scaleFloatY);

// And apply it to photo image
Bitmap bitmap = Bitmap.createBitmap(photo, 0, 0, photo.getWidth(), photo.getHeight(), matrix, true);

For more advanced operations (brightness etc.) you can look here: Android image sharpening, saturation, hue, brightness, and contrast

To store the image you need to do something like this:

ContentResolver cr = getContentResolver();
Uri uri = Uri.parse(MediaStore.Images.Media.insertImage(cr, bitmap, "mybitmap", "stacko"));
Community
  • 1
  • 1
gorn
  • 8,097
  • 5
  • 37
  • 44