Click here to Skip to main content
15,923,083 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi everyone!
I need some help.

i am trying to do a steganography program!
What i have imlemented is this:
I get the pixel.B value from the original image and i store all of them in a list<int> called ImgInt.
Then i convert the ints into bits and store every single bit 0, 1 in a list<int> ImgBits.
I do the same for the text with two lists TxtInt and TxtBits.

Then i replace the bits 7 - th, 15 - th, 23 - rd, 31 - st, 39 - th and go on of the ImgBits list with the bits from TxtBits list.
Later i convert back to int the values of ImgBits list and i set them to the pixel.B value of image and by this way i create the encrypted image.

The problem is that when i try to get the pixels from the encrypted image they are different from the ones that i set.

These are the int value of the combination pxl - txt bits which i set to the enckryted image

Pixelit [0][0] = 198
Pixelit [0][1] = 198
Pixelit [0][2] = 198
Pixelit [0][3] = 199
Pixelit [0][4] = 199
Pixelit [0][5] = 200
Pixelit [0][6] = 200
Pixelit [0][7] = 200
Pixelit [0][8] = 199
Pixelit [0][9] = 199
Pixelit [0][10] = 199
Pixelit [0][11] = 200
Pixelit [0][12] = 200
Pixelit [0][13] = 201
Pixelit [0][14] = 201
Pixelit [0][15] = 201
Pixelit [0][16] = 201
Pixelit [0][17] = 200
Pixelit [0][18] = 198
Pixelit [0][19] = 197
Pixelit [0][20] = 197
Pixelit [0][21] = 198
Pixelit [0][22] = 198
Pixelit [0][23] = 199
Pixelit [0][24] = 199
Pixelit [0][25] = 200
Pixelit [0][26] = 202
Pixelit [0][27] = 202
Pixelit [0][28] = 202
Pixelit [0][29] = 201
Pixelit [0][30] = 199
Pixelit [0][31] = 196
Pixelit [0][32] = 202
Pixelit [0][33] = 200
Pixelit [0][34] = 200
Pixelit [0][35] = 200
Pixelit [0][36] = 200
Pixelit [0][37] = 200

These are the values of pixel.b that i get from the enckrypted when i start to deckrypt.

Pixelit [0][0] = 198
Pixelit [0][1] = 201
Pixelit [0][2] = 196
Pixelit [0][3] = 196
Pixelit [0][4] = 199
Pixelit [0][5] = 196
Pixelit [0][6] = 201
Pixelit [0][7] = 199
Pixelit [0][8] = 196
Pixelit [0][9] = 199
Pixelit [0][10] = 197
Pixelit [0][11] = 198
Pixelit [0][12] = 198
Pixelit [0][13] = 203
Pixelit [0][14] = 200
Pixelit [0][15] = 201
Pixelit [0][16] = 200
Pixelit [0][17] = 203
Pixelit [0][18] = 201
Pixelit [0][19] = 198
Pixelit [0][20] = 199
Pixelit [0][21] = 199
Pixelit [0][22] = 199
Pixelit [0][23] = 202
Pixelit [0][24] = 196
Pixelit [0][25] = 199
Pixelit [0][26] = 201
Pixelit [0][27] = 202
Pixelit [0][28] = 201
Pixelit [0][29] = 201
Pixelit [0][30] = 199
Pixelit [0][31] = 200
Pixelit [0][32] = 198
Pixelit [0][33] = 199
Pixelit [0][34] = 201
Pixelit [0][35] = 200

This two sets of values have to identical.

Thanks in advance!
Posted

1 solution

I suggest you start reading these[^]. It's an excellent series of articles on steganography.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 26-May-14 22:26pm    
5ed. I did not know he wrote so many articles on the topic; it's a big work.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900