tags:

views:

12

answers:

1

In my application I use an image . I made some portion of the image transparent. Now How can I find the co-ordinates of the transparent portion of the image so that I am able to find the actual area of the non-transparent area.. I want some methodical way to find..

please help

A: 

I don't know the android SDK, but I doubt it has image manipulaiton built in. so using what ever language you are in, you need to open the image as data. Hopefully you can use an image library that will perform things like getting the size of the image. This will let you access the raw pixel data, which you can then check though till you find a pixel whos transparency is not equal to zero.

finding it in the rows is fairly easy, but the columns will take a bit more work. Remember that pixel data will be accessed as an array of length width * height in pixels.

thecoshman