1. Image Scaling: the entire image information is not parsed.
DemoActivity = (ImageView) Display currentDisplay = dw = dh = BitmapFactory.Options bmpFactoryOptions = bmpFactoryOptions.inJustDecodeBounds = Bitmap bmp = BitmapFactory.decodeFile("/sdcard/img.jpg" heightRatio = ()Math.ceil(bmpFactoryOptions.outHeight/( widthRatio = ()Math.ceil(bmpFactoryOptions.outWidth/("HEIGHTRATIO",""+"WIDTHRATIO",""+ bmpFactoryOptions.inJustDecodeBounds = (heightRatio>=== BitmapFactory.decodeFile("/sdcard/img.jpg"
2. ExifInterface:
DemoActivity = ExifInterface ("sdcard/img.jpg" "camera", "Kodak camera" "camera"
3. Select an image from the image library and set it to ImageView.
DemoActivity = (ImageView) Intent intent = "image/*"0 onActivityResult( requestCode, (data!= Uri uri =
4. Create a copy of an image (bitmap:
DemoActivity = (ImageView) = (ImageView) = "image/*"0 onActivityResult( requestCode, (data!= Uri uri = Bitmap bitmap = Matrix matrix = Paint paint = ); matrix.setRotate(15); Bitmap alteredBitmap = Bitmap.createBitmap(bitmap, 0, 0 Canvas canvas =
5. image synthesis:
DemoActivity = (ImageView) = "image/*"10 = File("/sdcard/1.jpg"= 100 Intent intent = Intent(Intent.ACTION_MEDIA_MOUNTED,Uri.parse("file://"+ = "image/*"20 onActivityResult( requestCode, (requestCode==10(data!===== = 0, 0 (requestCode==20(data!== =0,0
6. Draw text based on Path:
DemoActivity MyView( MyView = 20= 20, 20100, 150200, 220"Hello this is text on a path", p, 0, 0
7. Drawing (move your finger to create an image and save it ):
DemoActivity = (ImageView) = height = diaplay.getHeight() - 40 width === = 10 startx = 0 starty = 0 == x = y === endx = endy = = File("/sdcard/"+System.currentTimeMillis()+".jpg"= 100 Intent intent = Intent(Intent.ACTION_MEDIA_MOUNTED,Uri.parse("file://"+