【问题标题】:Android crop bitmapAndroid 裁剪位图
【发布时间】:2015-12-11 19:36:51
【问题描述】:

我需要以编程方式从位图中裁剪特定区域,例如此图像上的蓝色区域

我该怎么做?

【问题讨论】:

标签: android bitmap crop


【解决方案1】:

就像下面这样:

// x refers to width, y refers to height
//first find startx, starty, endx, endy
Bitmap blueArea = Bitmap.createBitmap(bitmap, startx, starty, endx, endy);

【讨论】:

    猜你喜欢
    • 2012-11-08
    • 2011-10-18
    • 2012-12-02
    • 2019-05-10
    • 2013-04-05
    • 2017-07-05
    • 1970-01-01
    • 1970-01-01
    • 2015-02-02
    相关资源
    最近更新 更多