How to make an small image invisible inside a large image
Posted: 2007-06-04T10:49:07-07:00
and the small image still can be detected by Imagemagick.
thansks fanaticjasper!
thansks fanaticjasper!
Use https://github.com/ImageMagick/ImageMagick/discussions instead.
https://imagemagick.com/discourse-server/
https://imagemagick.com/discourse-server/viewtopic.php?t=8915
Code: Select all
convert -gravity center label:"Watch\nthe\nBirdy" message.gif
identify message.gif
Code: Select all
convert rose: rose_original.png
composite message.gif rose: -stegano +15+5 rose_message.png
Code: Select all
compare -metric PAE rose_original.png rose_message.png rose_difference.png
Code: Select all
convert -size 36x43+15+5 stegano:rose_message.png message_recovered.gif
Code: Select all
for (i=QuantumDepth-1; (i >= 0) && (j < QuantumDepth); i--)
{
for (y=0; (y < (long) watermark->rows) && (j < QuantumDepth); y++)
{
for (x=0; (x < (long) watermark->columns) && (j < QuantumDepth); x++)
{
pixel=AcquireOnePixel(watermark,x,y,exception);
q=GetImagePixels(stegano_image,k % (long) stegano_image->columns,
k/(long) stegano_image->columns,1,1);
if (q == (PixelPacket *) NULL)
break;
switch (c)
{
case 0:
{
SetBit(q->red,j,GetBit(PixelIntensityToQuantum(&pixel),i));
break;
}
case 1:
{
SetBit(q->green,j,GetBit(PixelIntensityToQuantum(&pixel),i));
break;
}
case 2:
{
SetBit(q->blue,j,GetBit(PixelIntensityToQuantum(&pixel),i));
break;
}
}
if (SyncImagePixels(stegano_image) == MagickFalse)
break;
c++;
if (c == 3)
c=0;
k++;
if (k == (long) (stegano_image->columns*stegano_image->columns))
k=0;
if (k == image->offset)
j++;
}
}