Raw Bytes to Image conversion...
Posted: 2017-02-22T11:43:00-07:00
I posted this to stackoverflow before I discovered ImageMagick...
http://stackoverflow.com/questions/4238 ... age-format
"How do I convert a file with up to 320k of bytes into an image with with 1, 2, or 3 bytes (any will do) of color?
I'm wanting to show off how small my 1980's era application is by representing 100% of the 320k of data as a bitmap image printed onto my project card.
I know the data won't look like anything but noise, but that's OK. I just want to be able to say: "That's it - those pixels uniquely represent every byte in this application!"
It'd be cool if there was a "2D barcode" app that does this, but after an hour of searching I couldn't find one that had the capacity and was implemented (plenty of papers.)"
Can ImageMagick do this for me? Stream of bytes -> 8 bit color image. I'm sure I'll have to give a image size that can hold the data, but what switches/formats can I use with ImageMagick to do this?
Thank you so much. If you're on SO, please give your answer there so I can vote it up and choose it as best answer.
http://stackoverflow.com/questions/4238 ... age-format
"How do I convert a file with up to 320k of bytes into an image with with 1, 2, or 3 bytes (any will do) of color?
I'm wanting to show off how small my 1980's era application is by representing 100% of the 320k of data as a bitmap image printed onto my project card.
I know the data won't look like anything but noise, but that's OK. I just want to be able to say: "That's it - those pixels uniquely represent every byte in this application!"
It'd be cool if there was a "2D barcode" app that does this, but after an hour of searching I couldn't find one that had the capacity and was implemented (plenty of papers.)"
Can ImageMagick do this for me? Stream of bytes -> 8 bit color image. I'm sure I'll have to give a image size that can hold the data, but what switches/formats can I use with ImageMagick to do this?
Thank you so much. If you're on SO, please give your answer there so I can vote it up and choose it as best answer.