Code example for BitmapFactory.Options

Methods: decodeStream

0
	protected InputStream getImageStream(ImageDecodingInfo decodingInfo) throws IOException {
		return decodingInfo.getDownloader().getStream(decodingInfo.getImageUri(), decodingInfo.getExtraForDownloader());
	} 
 
	protected ImageFileInfo defineImageSizeAndRotation(InputStream imageStream, String imageUri) throws IOException {
		Options options = new Options();
		options.inJustDecodeBounds = true;
		BitmapFactory.decodeStream(imageStream, null, options);
		imageStream.reset();
 
		ExifInfo exif;
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR) {
			exif = defineExifOrientation(imageUri, options.outMimeType);
		} else { 
			exif = new ExifInfo();
		} 
		return new ImageFileInfo(new ImageSize(options.outWidth, options.outHeight, exif.rotation), exif);
	} 
 
	protected ExifInfo defineExifOrientation(String imageUri, String mimeType) {
		int rotation = 0;