0

I have a source image in PNG with alpha information, that I scale with Graphics.scaleInto():

Bitmap dst = new Bitmap(123, 178);
dst.createAlpha(Bitmap.ALPHA_BITDEPTH_8BPP);
Bitmap img = Bitmap.getBitmapResource(name);
img.scaleInto(dst, Bitmap.FILTER_BOX);

This works, the new scaled image is put in dst, but the alpha information is distorted. Some areas show as white, while some are transparent. Transparency borders have a blue tint to them.

Prof. Falken
  • 24,226
  • 19
  • 100
  • 173

1 Answers1

2

How do you draw the scaled image? As I found in my earlier question, even if you are doing the scaling correctly with respect to alpha, you need to call a drawing method that makes use of the alpha - Graphics.drawARGB().

Community
  • 1
  • 1
Michael Donohue
  • 11,776
  • 5
  • 31
  • 44