str1 = "Rakitin, of course, was a person of tooo little consecuense to be invited to the dinner, to which Father Iosif, Father Paissy, and one othr monk were the only inmates of the monastery invited. They were alraedy waiting when Miusov, Kalganov, and Ivan arrived. The other guest, Maximov, stood a little aside, waiting also. The Father Superior stepped into the middle of the room to receive his guests. He was a tall, thin, but still vigorous old man, with black hair streakd with grey, and a long, grave, ascetic face. He bowed to his guests in silence. But this time they approaced to receive his blessing. Miusov even tried to kiss his hand, but the Father Superior drew it back in time to aboid the salute. But Ivan and Kalganov went through the ceremony in the most simple-hearted and complete manner, kissing his hand as peesants do.";
ch1 = char(str1);
len1 = length(ch1);

img1 = terminator;

r = img1(:,:,1)';
g = img1(:,:,2)';
b = img1(:,:,3)';
a = r*255;

D = horzcat(b(:),g(:),r(:),a(:))';
            
msg2 = D(:);
len1 = length(msg2);


repeat2 = 1600;

x = typecast(uint32(len1),'uint8'); % swapbytes()
y = typecast(uint32(len1*repeat2),'uint8'); % swapbytes()



msg = [fliplr(x), uint8(msg2')];