I have taken the suggestions on board and changed my code as follows (A different function is shown, but same general principle).
int (*image_process_flip_vertical(int data, int width, int height))
static int new_data[width][height];
for(i=0; i<width; i++)
for(j=0; j<height; j++)
new_data[i][j] = data[i][(width-1)-j];
return (int **)new_data;
I get the following error though:
image_processor.c:84: warning: passing argument 1 of 'image_process_flip_vertical' makes pointer from integer without a cast
I can't figure out why.
Same thing happens if i change the function declaration to:
int (*image_process_flip_vertical(int data[MAX_X][MAX_Y], int width, int height))
Once again, thanks in advance for any help.