Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iphonejudy

macrumors 6502
Original poster
Sep 12, 2008
301
1
I saw a document find a alpha value like below,


Code:
return pixelData[y * width + x]/255;

But i got error ,Invalid operands to binary /
 
It is impossible to tell what is going on with the amount of code you gave, but chances are that pixelData is a char array that holds the raw binary image data...and I'm guessing that you're not actually working with the same type of variable in your own objective-c code.
 
I saw a hasalpha mehod to find the alpha value.But it finds the alpha value only for image.

Its a great drawback that iphone doesnot have a method to find the alpha value for a pixel
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.