Convert any file (raw data) to png? Use png as zip basically
Posted: 2008-12-21T17:10:52-07:00
Is it possible to convert any file (text, pictures, audio, video, any data) to a png? So basically png image compression would be used as data compression, png instead of zip. The outputted png image would be look scrambled since it has the bytes of the original file stream arranged into a png.
won't work because ImageMagick tries to read the headers of data.dat which doesn't have image headers. Is this encoding (compression) possible? Are certain parameters needed?
Equally important would the decoding (decompression) of the png back to the data file be possible? With the syntax
plus some parameters probably. Somehow the original file name ("data.dat") would have to be encoded into the png as well.
If ImageMagick can't do this is there another program that can?
EDIT: I'm mainly talking about png due to its lossless compression but if this could done with a jpg that would be interesting.
Code: Select all
convert data.dat output.png
Equally important would the decoding (decompression) of the png back to the data file be possible? With the syntax
Code: Select all
convert output.png data.dat
If ImageMagick can't do this is there another program that can?
EDIT: I'm mainly talking about png due to its lossless compression but if this could done with a jpg that would be interesting.