Hide text in an ordinary looking png image, written in pure c without any external libraries. Supports PNG format images. Do read the PNG Specification (here) before trying to understand how it works.
Storing Text in PNG Images using C.
File format supported : PNG.
Arguments:
- f : filename. takes <file path> as paramter.
- e : Encode text from the given file.
- d : Decode text in the given file.
- t : Text which will be encoded in the image. takes <text> as paramters.
- Encoding text in a png image.
main -f demo.png -e -t 'this text will get encoded'
>> FILENAME : demo.png
>> ENCODING MODE.
>> DATA TO BE ENCODED IN THE IMAGE : this text will get encoded (26 bytes).
>> ENCODING SECRET CHUNK.
>> ENCODING COMPLETE.
>> Total duration it took: 0.001000ms
This will result a image named output.png
with the text you provided encoded in it.
- Decoding text from an image.
main -f output.png -d
>> FILENAME : output.png
>> DECODING MODE.
>> DECODED TEXT : this text will get encoded
This will decode the text from the given image.
gcc main.c -o main -O3
You can use any compiler of your choice.
also you can #define DEBUG
to enable debug statements.