Monday, May 24, 2010

Please help me with this code?

I need to write a c library ( pseudocode for now ) that will : invert the pixels in an image whose name is supplied on the command line. The function will IMPORT a 2-D pixel array and EXPORT the resulting 2-D pixel array via the function mechanism. Can someone help me get started , I have no clue how to design thisin pseudocode. Thanks a lot for your help

Please help me with this code?
I'm assuming this is just a simple 2D array of pixels where and NxM array consists of a color at a given coordinate. Nothing fancy.











Load Image;


Convert image to N x M array;





From here, are you inverting horizontally/vertically/both????





If flipping on the Y axis, just reverse the N (x) values.


if the array is


[4 3 2]


[7 3 4]


[1 4 6]





Just make





[2 3 4]


[4 3 7]


[6 4 1]





I don't think you need me to tell you to reverse a list. Pretty straight forward from here.





new = Invert(matrix N M);





save/print(new);
Reply:It is not that easy. May be you can contact a C expert at http://oktutorial.com/


No comments:

Post a Comment