Page 1 of 1

Understand my version of ImageMagick

Posted: 2009-09-14T10:42:53-07:00
by broscott
I have a series of questions, but in order to ask them correctly, and to place in correct area, I need assistance in identifying the type of ImageMagick I am referring to.

I have a cloud account with Mosso.com
via php, ImageMagick is standard.

/usr/bin/convert
is the path to the convert command.

My successful work in calling and performing image conversions are as such
<?php
$size = getimagesize($sourcefile);
exec("convert -density 300x300 -size '$size[0]'x'$size[1]' $sourcefile -flatten +adjoin $coutputfile");
exec("convert -depth 8 -density 300x300 -size '$size[0]'x'$size[1]' xc:none test.psd[2] test.psd[3] test.psd[4] test.psd[5] -flatten +adjoin test/output4.png");
exec("convert -depth 8 -density 300x300 -size '$size[0]'x'$size[1]' xc:none test.psd[2] -composite +adjoin test/output11.png");
exec("convert -depth 8 -density 300x300 test.psd[3] test/output5.png");
exec("convert -depth 8 -density 300x300 test.psd[4] test/output6.png");
exec("convert -depth 8 -density 300x300 test.psd[5] test/output7.png");
?>

So, as I desire to post questions, I am looking for answers of the fashion, and usage as done above.
ImageMagick seems to have soooooo many types, I am lost to begin a forum question in a systemic method that will benefit me and or others.

Any help would be appreciated.
Thank you in advance.

Re: Understand my version of ImageMagick

Posted: 2009-09-14T10:53:15-07:00
by fmw42

Re: Understand my version of ImageMagick

Posted: 2009-09-14T10:56:16-07:00
by broscott
I have done a lot of reading, but get lost in the various types of scripts, command line, etc.

That said, I noticed the wording you used... "php with exec"

The article mentioned, I have poured over already.

Should I post questions, it seems I should state I am using PHP with Exec.

Re: Understand my version of ImageMagick

Posted: 2009-09-14T11:37:36-07:00
by Bonzo
Still unsure of your exact question and I do not know if this is the answer you are looking for.

I started with :

Code: Select all

exec("convert input -resize 100x100 output");
I now use it this way as it is easer to read :

Code: Select all

$cmd = "convert input -resize 100x100 ";
exec("convert $cmd output");
Or is this the answer:
Say you are using php but the examples should work with command line or php; you may need to add some " etc. to the reply but you will get a reply eitherway.
If the reply does not work at least people can not say you didn't tell us you were using php :D

I must admit that I post my questions and answers in the php format as that is the method I prefer working in.

Re: Understand my version of ImageMagick

Posted: 2009-09-14T13:39:06-07:00
by broscott
Hello,
Thanks for the response time!

Actually, I am doing the calls, from within php statements.
If command lines can also be done within a php statement, then that is fine.
I have a limited scope of knowledge and right now, know one path which works, thus refrenced it.

So If I begin a post or question as PHP exec is my method, my problem or desire is...
I feel I'm on the right track.

Will begin my first request.

I did, once again go to that link you provided and reviewed the info again, used php statements to grab lots of data, and will make post of questions.

Again, thank you for your help, and the speediness thereof.
:)

Re: Understand my version of ImageMagick

Posted: 2009-09-14T13:41:17-07:00
by broscott
ok,, I'm the dummy, before you respond, I just looked over the last reply and see my oversite, that it was a php snippet and not a command line item.

Thank you for the suggestion of cleaning up php for easier to read.
:)