开发者

how to develop android image distorstion

how to develop the image distortion in android , i.e: in adobe Photoshop there is one default control (forword warp tool) which is used to image distortion and i need to make this control function by android coding..

is any body have made any kind of this application which will able to make the image distortion by android,,

for refarance i shows one image on which by Photoshop's forw开发者_如何学编程ord warp tool's help the image distortion done,, i need to do like that control functionality by android coding ....

Thanks in advance.....

how to develop android image distorstion


I think you will have to implement your own image distortion class which can manipulate the image matrix.. Maybe you should search the web maybe you find sth.

something like this:

distort(int[][][3] image, double[][][3] matrix){
    for(int i =0; i < imagelength; i++){
        for(int j =0; j< imagewidth; j++){
            image[i][j][0] = (int) (image[i][j][0] * matrix[i][j][0]);
            image[i][j][1] = (int) (image[i][j][1] * matrix[i][j][1]);
            image[i][j][2] = (int) (image[i][j][2] * matrix[i][j][2]);
        }
    }
return image;
}

pixel i,j will be distorted if

matrix[i][j][0] != 1
matrix[i][j][1] != 1
matrix[i][j][2] != 1


Find image distorstion libaries written in java and try to implement them on android.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜