Solved

PHP/ImageMagick problem making drop shadow

Posted on 2007-04-01
3
634 Views
Last Modified: 2010-08-05
This does not work.

Can anyone please fix it?  Thanks!


                  exec("/usr/local/bin/convert ' . escapeshellarg($im_path . $row->ImageFile) . ' -resize ' . escapeshellarg($Thumb_Width . 'x' . $Thumb_Height . '>') . ' +profile "*" ' . ' -crop '. escapeshellarg($Thumb_Width . 'x' . $Thumb_Height . '+0+0').' +repage -bordercolor red  -border 1 -bordercolor white -border 4 -bordercolor green -background black \\( +clone -shadow 60x4+4+4 \\) +swap  -background blue -flatten  +repage -quality 98 ".escapeshellarg($im_path . 'vita/' . $row->ImageFile), $x, $result);

0
Comment
Question by:hankknight
3 Comments
 
LVL 6

Accepted Solution

by:
deresh earned 500 total points
ID: 18834726
exec("/usr/local/bin/convert " . escapeshellarg($im_path . $row->ImageFile) . ' -resize ' . escapeshellarg($Thumb_Width . 'x' . $Thumb_Height . '>') . ' +profile "*" ' . ' -crop '. escapeshellarg($Thumb_Width . 'x' . $Thumb_Height . '+0+0').' +repage -bordercolor red  -border 1 -bordercolor white -border 4 -bordercolor green -background black \\( +clone -shadow 60x4+4+4 \\) +swap  -background blue -flatten  +repage -quality 98 '.escapeshellarg($im_path . 'vita/' . $row->ImageFile), $x, $result);

there you are, you have wrongly mixed " and ' . don't you use some editor with syntax higlighting ?!

0
 
LVL 16

Author Comment

by:hankknight
ID: 18835537
I use notepad. (Yea, I know I'm crazy!) A good editor might save me some time.....  Any good SIMPLE free editors?
0
 
LVL 1

Expert Comment

by:ajay_chamarthy
ID: 18835583
There you are you did some basic syntax errors as deresh mentioned in using " and '.
I am using Editplus .i downloaded as a trail version and it is working after the time limit also
exec("/usr/local/bin/convert " . escapeshellarg($im_path . $row->ImageFile) . ' -resize ' . escapeshellarg($Thumb_Width . 'x' . $Thumb_Height . '>') . ' +profile "*" ' . ' -crop '. escapeshellarg($Thumb_Width . 'x' . $Thumb_Height . '+0+0').' +repage -bordercolor red  -border 1 -bordercolor white -border 4 -bordercolor green -background black \\( +clone -shadow 60x4+4+4 \\) +swap  -background blue -flatten  +repage -quality 98 '.escapeshellarg($im_path . 'vita/' . $row->ImageFile), $x, $result);

All the best dude :-)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question