Skip to content

Instantly share code, notes, and snippets.

function [] = reveal(key)
tree = imread('result.png');
r = tree(:,:,1);
g = tree(:,:,2);
b = tree(:,:,3);
%cat = mod(tree,4);%get the least significant 2 bits from each pixel color component.
%cat = cat * 64;%move the least significant 2 bits to the most significant bits
cat(:,:,1) = getimg(r,key);
function [key] = conceal()
tree = imread('tree.png');
tree = tree - mod(tree,4);%set least significant bits of each pixel color component to 00
r = tree(:,:,1);
g = tree(:,:,2);
b = tree(:,:,3);
key = randi(20);
hide(r,key,1);