Thursday, March 10, 2022

Steganography part 4

 



Steganography - EncodePic

The most time consuming part about this program is the design. I knew I want a header, but what should I put in? 

1. File id: 4 bytes+newline 

2. Version: 2 bytes+ newline

3. Format: 1 byte+ newline

4. Size: 4 bytes+newline

5. Filename: 16 bytes+newline


Total: 32 bytes header. Optional: multiple files. Repeating 3-5 until EOF.


Note: There's a bug as shown. loadPixel() needs to be called first. Move it to after printing Encode start and before Write Header comment. Otherwise, you'll get Null Pointer Exception because the pixels[] isn't instantiated. 


No comments:

Post a Comment