clc;
clear;
I = imread('lena.jpg');
key = 123;
rand('state',key);
W = round(rand(1,80));
s = size(I);
Sr = rand(2,length(W));
Sr(1,:) = ceil(Sr(1,:)*s(1));
Sr(2,:) = ceil(Sr(2,:)*s(2));
for i = 1:length(W)
I(Sr(1,i),Sr(2,i)) = mod(I(Sr(1,i),Sr(2,i)) + W(i),256);
end