I have found a way to do some steganography with imagemagick and it's capacity to extract bit planes, but now I'm stuck for merging the different bit planes.
I have two images A and B (same size):
A is the mask et B the secret i want to hide.
On A I do :
Code: Select all
convert A -fx '(int(u*255)&240)/255' A
On B I do :
Code: Select all
convert B -fx '(int(u*255)&240)/(255*16)' B
The question is : How do I merge A and B to make my final image C ?
Code to recover the secret :
Code: Select all
convert C -fx '(int(u*255)&15)*(16/255)' D