How can I create a png or jpeg file programatically ?
Given a matrix with 0,1 entries, how can I create a graphic in linux such that we have a black square or pixel if the entry is one and white otherwise?
For example, if the matrix is:
then I want a graphic that looks like:
I will be working with many large matrices, e.g. 1000x1000, or 5000x1000 so I need to do this automatically.
Your help is greatly appreciated.
Last edited by alanv; 10-03-2010 at 04:10 PM.