Android: can't create Bitmap with createBitmap method

后端 未结 2 1154

I\'m fairly new to programming on the android platform. I\'m having some problems massaging an int array to turn it into a Bitmap.

Each element in the int array is a num

2条回答
  •  鱼传尺愫
    2021-01-27 07:37

    How do you learn that your Bitmap has [-1 -1] size? To get size, use:

    int w = bm.getWidth();
    int h = bm.getHeight();
    

    This is working fine.

提交回复
热议问题