Upload
tamajit-chakraborty
View
6
Download
1
Embed Size (px)
DESCRIPTION
logic behind stenography.
Citation preview
Step1: StartStep2: Read the message MSG and the image IMGStep3: Set C=First character of the MSG and set J=1Step4: If C<END of MSG go to Step 5
Else go to Step 13Step 5: VAL=ASCII value of CStep 6: If VAL<10
Set X=0, Y=0, Z=VALElse If 10<=VAL>100
Set X=0, Y=VAL/10, Z=VAL%10Else If 100<VAL
Set X=VAL/100, Y=(VAL%100)/10, Z=VAL%10Step 7: R=Red Value of Pixel[J] of IMG
G=Green Value of Pixel[J] of IMGB=Blue Value of Pixel[J] of IMG
Step 8: If R>240 Set R=240If G>240 Set G=240If B>240 Set B=240
Step 9: Set R1 = (R/10)*10+XSet G1 = (G/10)*10+YSet B1 = (B/10)*10+Z
Step 10:Set R Value of Pixel[J]=R1Set G Value of Pixel[J]=G1Set B Value of Pixel[J]=B1
Step 11: Set J=J+1; Set C=C+1Step 12: Go to Step 4Step 13: R=R value of Pixel[J]Step 14: R1 = (R/10)*10Step 15: If R1=0 set R1=9
Else set R1=R1-1Step 16: End
Step1: StartStep2: Read image IMGStep3: Set P=1Step 4: Set R=Red Value of Pixel[P] of IMG
Set G=Green Value of Pixel[P] of IMGSet B=Blue Value of Pixel[P] of IMG
Step 5:If R % 10=9 go to step 11Else go to step 6
Step 6: Set X=R%10Set Y=G%10Set Z=B%10
Step 7: VAL=X*100+Y*10+ZStep 8: C[P-1] = Character of ascii value[VAL]Step 9: Set P = P+1
Step 10: Go to Step 4Step 11: J=0Step 12:Repeat Until J<=P-2
MSG=MSG+C[P]Step 13: Display MSGStep 14: End