Class BitmapUtils
- java.lang.Object
-
- com.cloudinary.android.uploadwidget.utils.BitmapUtils
-
public class BitmapUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description BitmapUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static android.graphics.BitmapdecodeSampledBitmapFromUri(android.content.Context context, android.net.Uri uri, int reqWidth, int reqHeight)Decode a sampled bitmap to the required width and height.static DimensionsgetBitmapDimensions(android.content.Context context, android.net.Uri uri)Get bitmap's dimensions.
-
-
-
Method Detail
-
decodeSampledBitmapFromUri
public static android.graphics.Bitmap decodeSampledBitmapFromUri(android.content.Context context, android.net.Uri uri, int reqWidth, int reqHeight) throws java.io.FileNotFoundExceptionDecode a sampled bitmap to the required width and height.- Parameters:
context- Android context.uri- Bitmap's source uri.reqWidth- Required width for the bitmap to be adjusted to.reqHeight- Required height for the bitmap to be adjusted to.- Returns:
- The decoded bitmap.
- Throws:
java.io.FileNotFoundException- If cannot locate the bitmap's source uri.
-
getBitmapDimensions
public static Dimensions getBitmapDimensions(android.content.Context context, android.net.Uri uri) throws java.io.FileNotFoundException
Get bitmap's dimensions.- Parameters:
context- Android context.uri- Bitmap's source uri.- Returns:
- Dimensions of the bitmap.
- Throws:
java.io.FileNotFoundException- If cannot locate the bitmap's source uri.
-
-