Originally Posted by
taurus
When u said that do u mean i replace width and height with EP100_LIB_MAX_X and EP100_LIB_MAX_Y
?
No, I mean that you need to at least do this:
Code:
int invert_image(int image_data[][EP100_LIB_MAX_Y], int width, int height)
But better yet:
Code:
int invert_image(int image_data[EP100_LIB_MAX_X][EP100_LIB_MAX_Y], int width, int height)
The latter is just a bit clearer. [And excuse me if I've swapped X and Y - but that's the way you are using them - I suspect your width and height may be swapped in your code - but I could be wrong.
Oh:
Code:
int red = ((image_data[width][height]>>16)&0xff);
int blue = ((image_data[width][height]>>8)&0xff);
int green = ((image_data[width][height])&0xff);
Should probably be [colum][row] instead of [width][height] - unless you actually only want to modify one pixel at the lower right corner just outside the actual image [e.g (100,100) when the image's last pixel is as (99,99)].
--
Mats