drawBitmap() and setPixels(): what's the stride?

后端 未结 4 1720
轮回少年
轮回少年 2021-02-12 13:09

Could please somebody explain me (ASCII is really welcome) what the stride argument stands for in Canvas.drawBitmap() and in Bitmap.setPixels()/getPixels()? I under

4条回答
  •  醉梦人生
    2021-02-12 14:03

    Here is a good explanation from Microsoft about what stride generally is in images. So, in plain English, it defines for how many steps will the computer scan image data until it assumes that it is on a next line.

    I also believe that @Romain Guy's example would also require to set x = 50 and height = 50 if I understand it correctly.

提交回复
热议问题