【问题标题】:How to change colormatrix x,y coordinate of image?如何更改图像的颜色矩阵 x,y 坐标?
【发布时间】:2011-01-28 18:43:30
【问题描述】:

我正在开发一个允许用户为图像着色的应用程序。我有我想要应用的颜色的颜色矩阵,但问题不是改变 x y 坐标的颜色,而是整个图像被着色。我不知道如何将 colormatix 应用于图像的指定坐标。

我正在使用

matrix = 
    new float[] { 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, };

imageview.setColorFilter(new ColorMatrixColorFilter(matrix));

我正在寻找类似imageview.SetPixelColorMatrix(x,y,matrix)

谁能帮帮我?

【问题讨论】:

    标签: android imageview colormatrix


    【解决方案1】:

    使用 createBitmap(位图源,int x,int y,int width,int height,Matrix m,布尔过滤器) 在这里您可以指定源的坐标。更多详细信息请参见this

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-02-01
      • 1970-01-01
      • 2021-04-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多