0

I am working on a writing a program that embeds data in a photo (steganography). This worked completely fine when I was using png lossless compression however I would like this to work in JPEG file format. Previously I would read in my image file and replace the last two bits in every color channel with a part of my message. Then I would compress it and output it. With lossy compression however I am assuming I cannot embed a message pre compression because without a doubt, the message would be unreadable.

My question is, do I need to embed the message post compression/encoding somewhere in the SOS YCbCr data? If not there then where must I store the message? Thank you in advance.

Daniel
  • 547
  • 5
  • 25
  • @Marichyasana, I know that I can put a message after a comment marker but that defeats the whole point. The whole point is to write an algorithm that obscures it. A comment is by no means obscure. – Daniel Nov 17 '17 at 07:26
  • Possible duplicate of [LSB-DCT based Image steganography](https://stackoverflow.com/questions/35396977/lsb-dct-based-image-steganography) – Reti43 Nov 17 '17 at 10:34
  • Another similar question dealing with [lossy steganography in Java](https://stackoverflow.com/questions/29677726/steganography-in-lossy-compression-java). It repeats a lot of the same information the suggested duplicate does, but it also provides some code for a more concrete example. – Reti43 Nov 17 '17 at 10:41

1 Answers1

1

The best place to hide a message in JPEG is in the blocks that extend beyond the edge of the image (unless the image dimensions are multiples of 8).

user3344003
  • 20,574
  • 3
  • 26
  • 62