Skip to main content
7 events
when toggle format what by license comment
Jul 6, 2016 at 15:07 vote accept sgmm
Jul 6, 2016 at 7:23 comment added Edgar Bonet @CrystalPritzker: In essence yes, except that 1) you have to write "P2" before the numbers, c.f. my example 2) You don't “convert that file to an image”: it's already an image, you just convert it to a more common image format.
Jul 6, 2016 at 0:09 comment added sgmm @EdgarBonet So are you saying that it's really as simple as writing the number in a text file and then ending it with .pgm? Then convert that file to an image?
Jul 5, 2016 at 20:02 comment added James Waldby - jwpat7 @CrystalPritzker, your sketch could write PGM-formatted data, which you pipe to a .pgm file on the host, or you could write a program that receives data organized however you like and writes it to a .pgm file. See eg tutorialspoint....c_file_io or cprogramming...cfileio re opening a file and writing to it. With a .pgm file, use a pgm-to-jpg (or whatever) program. (Search google for "pgm to jpg" and find eg pgm-to-jpg converters
Jul 5, 2016 at 19:27 comment added Edgar Bonet @CrystalPritzker: It's just a text file. How would you write a text file on your computer?
Jul 5, 2016 at 18:49 comment added sgmm That kind of what I'm looking for, I just want to actually see the image and don't care much about efficiency. However, I did not get from the documentation how you would go about making of the these PGMs. Is it a file I make based on the numbers? Like do I take the values and past them into this PGM file?
Jul 5, 2016 at 18:27 history answered Edgar Bonet CC BY-SA 3.0