As mentioned in another question, using the drawable-nodpi folder will allow the android to resize your images.
In addition, if you want to have several versions of the image for the hdpi and ldpi formats, but do not want the system to resize them (for example, to preserve the power with two resolutions), you can use the following code while downloading the bitbip:
// ask the bitmap factory not to scale the loaded bitmaps BitmapFactory.Options opts = new BitmapFactory.Options(); opts.inScaled = false; // load the bitmap Bitmap bitmap = BitmapFactory.decodeResource(ctx.getResources(), R.id.mybmp, opts);
Xgouchet
source share