Page 2 of 2
Re: Install and use ImageMagick with PHP
Posted: 2010-12-01T11:33:39-07:00
by YBthebest
WoW! That's really nice of you
You're a real expert
I'll tell you once I managed to do everything, my people will definitely be happy.
gOCR, here I come.
Thanks again!
Re: Install and use ImageMagick with PHP
Posted: 2010-12-01T19:22:36-07:00
by anthony
Bonzo wrote:something like a png which is not compressed.
PNG is compressed, just not lossy-compressed. It is an important distinction.
Better still if the intermediate image is only going to be read by another IM command you can use MIFF, with preserves more of the images meta-data than PNG but this is definably NOT compressed.
Better still use the special file format MPC
http://www.imagemagick.org/Usage/files/#mpc
whcih performs a straight memory dump of the image to disk.
This file can be directly 'paged' back into the memory the next "convert" run being performed by same script as the previous command. This means IM does not have to format, encode, or decode the intermediate image data, making the image read by the next program extremely quick.
However be sure to clean up both of the two files this image file format creates. You need to clean up intermediate files anyway so that is not a big problem.
Re: Install and use ImageMagick with PHP
Posted: 2010-12-03T04:54:35-07:00
by YBthebest
Wow, thanks for the info
A last question. Is it possible to imagemagick a variable? Coz' actually I don't know the name of the file, somebody gives it to me, but through a variable? So can I /usr/bin lllblaba and then THEVARIABLE and then what I want to do on the image?
THEVARIABLE would be= image.jpg, for example!
Or can I imagemagick an external url? for example: google.com/image.jpg, and then I save the image on my own server?
Thanks
Re: Install and use ImageMagick with PHP
Posted: 2010-12-03T05:39:23-07:00
by Bonzo
You can use a URL:
Code: Select all
exec("convert http://www.google.com/image.jpg ouput.jpg");
Re: Install and use ImageMagick with PHP
Posted: 2010-12-03T08:33:08-07:00
by YBthebest
Euhm...okay thanks
But is it possible to do this:
exec("convert $url ouput.jpg");
?
Thanks
Re: Install and use ImageMagick with PHP
Posted: 2010-12-03T09:43:49-07:00
by Bonzo
Yes