Hacker News new | ask | show | jobs
by nsmartt 5258 days ago
I have no idea if this guy is serious, (EDIT: I submitted this before I saw his response) but it's entirely possible to embed data in JPEG files via base64 + modifying exif data. It isn't really viable for large files, however, unless vastly distributed. Perl:

  use Image::img;

  my $img = new Image::img;

  $img->ExtractInfo('image.jpg');
  #$img->SetNewValue("UserComment", $yourdata);
  #$img->SetNewValue("Comment", $yourdata);
  $img->WriteInfo('image.jpg');
1 comments

You don't need to use exif data. Many tools use the often ignored alpha channel of each pixel. In this case, you have X x Y bytes of available storage where X and Y are the width and height of the image.
For lossless images, you could also use the least significant bit of each color channel of each pixel to represent your binary payload. I doubt this would be noticeable, especially with a photograph.