Page 1 of 1
steganoImage php question
Posted: 2012-12-12T13:21:18-07:00
by nunjimmimya
hi
it's been many months since i use your imagick and let say it very usable to me (although i'm not very expert in scripting and programming)
i would like to ask about php steganoImage usage as there's no proper documentation in php site
would you explain a little on how to properly stegano an image and reverse it back
another question is:
let say by using your exmple
Code: Select all
composite message.gif rose: -stegano +15+2 rose_message.png
if i have my own host image to stegano it, how do i do that
thank you in advance
Re: steganoImage php question
Posted: 2012-12-12T13:26:31-07:00
by fmw42
I have not use this feature, but you can see examples at
http://www.imagemagick.org/Usage/transform/#stegano
Re: steganoImage php question
Posted: 2012-12-12T16:16:41-07:00
by nunjimmimya
thanks for the fast reply
Code: Select all
composite message.gif rose: -stegano +15+2 rose_message.png
as far as i know rose is embedded in the imagemagick system, so how can i call my own image instead of calling 'rose', 'logo' and other embedded image
i tried replacing rose with 'myownimage.png': but the command line seems 'hung'
below are my command line argument
Code: Select all
composite Desktop/message.gif Sites/stegano/image.png: -stegano +15+2 Desktop/stegano_message.png
also fails when trying to compare
Code: Select all
compare -metric PAE /Users/nunjimmimya/Sites/stegano/image.png: /Users/nunjimmimya/Sites/stegano/stegano.png /Users/nunjimmimya/Desktop/diff.png
did i miss anything anywhere?
Re: steganoImage php question
Posted: 2012-12-12T16:36:06-07:00
by fmw42
composite Desktop/message.gif Sites/stegano/image.png: -stegano +15+2 Desktop/stegano_message.png
Take out the : after the image.
composite Desktop/message.gif Sites/stegano/image.png -stegano +15+2 Desktop/stegano_message.png
That should work if your image is large enough to hold message.gif allowing for the offsets. Did it work with rose?
Do you have read permissions from Sites/stegano and for the image.png?
Is that the correct path from the working directory?
What version of IM are you using and on what platform?
This test worked just fine for me and ran almost instanteneously.
message.gif is on my desktop and monet3.jpg is in the working directory from which I ran the command.
composite /Users/fred/desktop/message.gif monet3.jpg -stegano +15+2 monet3_stegano.png
I am on IM 6.8.0.8 Q16 Mac OSX Snow Leopard
Re: steganoImage php question
Posted: 2012-12-12T16:56:39-07:00
by nunjimmimya
fred
below is my version installed
Code: Select all
Version: ImageMagick 6.8.0-2 2012-10-24 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenCL
i got the 'hang' problem when using command line and not in php
wonder what the error
the test just fine with the rose but not the file that i want
attach is identify result for my host image
Code: Select all
identify ../Sites/stegano/image.png
../Sites/stegano/image.png PNG 640x480 640x480+0+0 8-bit sRGB 348KB 0.000u 0:00.000
and this one is the message
Code: Select all
../Sites/stegano/message.gif GIF 50x40 50x40+0+0 8-bit sRGB 256c 1.33KB 0.000u 0:00.000
thank you for taking your time to look at my issue
*update
problem has been found
your 'rose' has ':' and your previous example didn't have ':'
can you explain what with the ':' thing?
i'm planning to run command line as last option if i can't use php imageStegano command to revert the hidden message
where can i get the documentation for php imageStegano command?
sorry for asking too much for you. your effort in contributing IM is already awesome
Re: steganoImage php question
Posted: 2012-12-12T17:21:49-07:00
by fmw42
Sorry I missed the colon : in your command. That is just to identify IM built-in images. See
http://www.imagemagick.org/script/forma ... tin-images All normal images should not include the ending colon.
i'm planning to run command line as last option if i can't use php imageStegano command to revert the hidden message
where can i get the documentation for php imageStegano command?
I have no idea what that is. Unless it is in Imagick, it is not related to Imagemagick. You can run the command line for IM stegano in a PHP exec() command.
If you mean this
http://php.net/manual/en/imagick.steganoimage.php, then it is an Imagick PHP call. Imagick is not supported by Imagemagick. But there is a forum for it at
viewforum.php?f=18
Re: steganoImage php question
Posted: 2012-12-12T17:30:09-07:00
by nunjimmimya
thanks a lot for guiding me to the end of the road
next road is a imagick in php
thank a lot
you really save my early morning (in malaysia
)
Re: steganoImage php question
Posted: 2012-12-12T19:22:09-07:00
by fmw42
nunjimmimya wrote:thanks a lot for guiding me to the end of the road
next road is a imagick in php
thank a lot
you really save my early morning (in malaysia
)
Why do you want to use Imagick. It is no longer supported and does not have all the IM functionality. You can easily follow the examples at
http://www.imagemagick.org/Usage/transform/#stegano, and just put them into PHP exec().
Re: steganoImage php question
Posted: 2012-12-12T20:11:21-07:00
by nunjimmimya
i'm using this just as requirement for my class project
actually what my lecturer wants me to find is a digital watermarking component (no the algorithm)
as it difficult to find, then i'm proposing him to use stegano component which IM does have it
while i'm searching for it, i found it has wrapper class in PHP so i tried to implement by using it without not thinking there would be such as difficult as this
Re: steganoImage php question
Posted: 2012-12-12T21:41:29-07:00
by fmw42
actually what my lecturer wants me to find is a digital watermarking component (no the algorithm)
see
http://www.imagemagick.org/Usage/compose/#watermark
Watermarking and stegano are quite different. In the watermark, you see the second image. In the stagano, it is hidden.
Re: steganoImage php question
Posted: 2012-12-12T22:33:57-07:00
by nunjimmimya
the problem with IM watermark is they're visible
the requirement is that you need to create a invincible watermark like digimarc did
that why i change from watermark to stegano
yeah, i know it quite troublesome for your to understand my situation and that is the issue
Re: steganoImage php question
Posted: 2012-12-12T23:19:46-07:00
by fmw42
OK, I understand, but probably cannot help with Imagick. All I can do is suggest you just use PHP exec() with the command line commands, which are easier to understand from
http://www.imagemagick.org/Usage/transform/#stegano
With regard to Imagick steganoImage, it should work with similar information. I assume you just tell it what watermark image you want to use and the offsets.
To recover it, I would assume you just create an empty image with the size values as per the link above and then specify the input stegano image with the preface of stegano:stegano_image.png.
But I have not tested this and am not really an expert in Imagick.
Re: steganoImage php question
Posted: 2012-12-18T21:31:54-07:00
by anthony
Actually the ':' means a prefixed 'coder', or image delegate. The name us usally the format of the image but can mean other things. That is, it is a 'loaded' module that either reads in, creates, or writes out a image. It may, (or in this case) may not, need a filename, color, or other argument, to work properly.
"rose:" is a special coder that generates a rose image from built-in data. That is all it does.
Other coders may generate image using a mathematicaly such as "gradient:", using specified colors, and a perviously given -size setting. Others like "mpc:" lets you store images in a named in-mmeory data store, and read them out again.