Code example for BitmapFactory.Options

Methods: decodeByteArray

0
     * @param image 
     * @param sampleSize 
     * @return bitmap or null if read fails 
     */ 
    public static Bitmap getBitmap(final byte[] image, int sampleSize) {
        final Options options = new Options();
        options.inDither = false;
        options.inSampleSize = sampleSize;
        return BitmapFactory.decodeByteArray(image, 0, image.length, options);
    } 
 
    /** 
     * Get scale for image of size and max height/width 
     * 
     * @param size 
     * @param width 
     * @param height 
     * @return scale 
     */ 
    public static int getScale(Point size, int width, int height) {
        if (size.x > width || size.y > height)