in reply to Re: Image::Magick stegano question
in thread Image::Magick stegano question

yes that is exactly what i am looking for. I insert the hidden watermark myself as shown in the code in my original post. The problem is I do not know the syntax needed to read it back out and check. I tried to use your code suggestion but that only prints me out the original base image which doesn't verify anything. I can't seem to uncover the syntac needed to extract the stegano inserted.
my $background=Image::Magick->new(magick=>"gif"); $background->BlobToImage($bin_data); $background->Set(size=>"100x100+1"); #size and offset of watermark + inserted $background->Read('stegano:result.gif'); $background->Write("gif-"); $bin_data = $background->ImageToBlob(); print "content-type: image/gif\n\n"; print $bin_data;
this only prints the full sized original image. not the watermark and it doesn't even display an image of the correct size. It shuold be 100x100 but instead is the regular full size of 640x460? thanks

Replies are listed 'Best First'.
Re^3: Image::Magick stegano question
by blokhead (Monsignor) on Jun 24, 2004 at 22:02 UTC
    $background->Read('stegano:result.gif');
    tries to read from result.gif, but you're also trying to read from a blob at the same time.

    As far as I can tell, the image needs to read from a file for this to work. I tried setting the magick to "stegano" and the correct size and offset before reading from a blob and didn't get any luck. Saving to a file and doing Read("stegano:filename") worked fine for me with the code from my first reply.

    Maybe someone with more PerlMagick experience can help out.. I only found one example of writing and reading a watermark using PerlMagick, but not from a blob.

    blokhead

      thanks. yeah that is my problem i can't find any examples and I am haveing a hard time figuring out the docs for that part. UPDATE: downvoted because why?