Scale a Bitmap and preserve alpha, on BlackBerry
I am trying to scale down a Bitmap that contains transparency. Unfortunately, all three methods I've tried result in white where there should be full transparency. I would like to maintain the transparency. The bitmap I am scaling is always square, so my functions assume that: private static Bitmap scale1(int edge, final Bitmap res) { int factor = edge == 0 ? Fixed32.ONE : Fixed32.div(res.getHeight(), edge); Bitmap scaled = PNGEncodedImage.encode(res). scaleImage32(factor, factor).getBitmap(); return scaled; } private static Bitmap scale2(int edge, final Bitmap res) { Bitmap val = new Bitmap