I'm trying to load a picture from the gallery into a bitmap using this code:
Bitmap myBitmap = Bitmap.createScaledBitmap(BitmapFactory.decodeFile(adress), (int)viewWidth/2, (int)viewHeight/2, false);
where 'adress' is the adress of the picture in the gallery. This works fine on my Galaxy Note 1, android version 2.3.6, but crashes due to 'out of memory' on my Galaxy 2, android version 4.1.2
Am I doing something wrong here? Is there a way to get a scaled bitmap? The resulting bitmap (when this does work) is a bit smudged due to scaling, but I don't mind. Thanks!!!