Steganography 101
Alright, the description of what they were doing was pretty basic, so I wondered if I should do the exercise - itching to get to Course 2 you see 😊 And, it paid off big time. I would have been happy to do just the hidden image recovery - but, ended up whacking out the encoder and decoder in a decent time. Okay, what is it in a nutshell? Each R,G,B pixel has eight bits. Retain the four MSBs (Most Significant Bits) and use the four LSBs (Least SBs) to store the MSBs of your message. Neat, eh? Of course, you can only store an image of same or smaller size, so the first thing you do is a crop.. So, starting with : hilton.jpg 140x210 As the "cloak" image, you want to hide this one, the "data" : usain.jpg(300x300) Cropping : function crop( img_cloak, img_data ){ var cropped_data = new SimpleImage(width=Math.min(img_cloak.getWidth(),img_data.getWidth() ), height=Math.min(img_cloak.getHeight(), img_data.getHeight() ) ); var p; for( p of cropped_data.values(...