0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 13.58.110.182


Current Path : /proc/thread-self/root/home/ubuntu/ImageMagick-7.0.10-22/PerlMagick/demo/
Upload File :
Current File : //proc/thread-self/root/home/ubuntu/ImageMagick-7.0.10-22/PerlMagick/demo/steganography.pl

#!/usr/bin/perl

use Image::Magick;

#
# Hide an image within an image
#
$watermark=Image::Magick->new;
$watermark->ReadImage('smile.gif');
($width, $height)=$watermark->Get('width','height');
#
# Hide image in image.
#
$image=Image::Magick->new;
$image->ReadImage('model.gif');
$image->SteganoImage(image=>$watermark,offset=>91);
$image->Write('model.png');
$image->Write('win:');
#
# Extract image from image.
#
$size="$width" . "x" . "$height" . "+91";
$stegano=Image::Magick->new(size=>$size);
$stegano->ReadImage('stegano:model.png');
$stegano->Write('stegano.gif');
$stegano->Write('win:');