On Fri, 10 Jul 2009 12:48:32 -0400
Ben Marchbanks <[email protected]> wrote:
| I am trying to rotate a thumbnail and add a dropshadow - almost there
| except the dropshadow is not
| respecting the opacity parameter. Comes out as 100% opaque.
|
| What am I missing here ?
|
| $rotateDeg = 60 / count($imgsrc);
| $degIncr = ((count($imgsrc) / 2) * $rotateDeg) *-1;
|
| for($t=0; $t<count($imgsrc); $t++){
| $cmd = $imagick."convert -background none -rotate ".$degIncr ."
| ".$imgsrc[$t] ." ".$imgdest[$t] ;
| exec($cmd);
|
| $size = getimagesize($imgsrc[$t]);
| list($width, $height, $type, $attr) = getimagesize($imgdest[$t]);
| $w=$width+20;
| $h=$height+20;
|
| $cmd = $imagick."convert -repage ".$w."x".$h. " ".$imgdest[$t]." \(
| +clone -background black -shadow 80x5+10+10 \) +swap -background none ".
| $imgdest[$t] ;
|
| exec("$cmd 2>&1", $output);
| foreach($output as $outputline){
| $stringData = $outputline."<br>";
| $cmdData .= $outputline."<br>";
| echo $stringData;
| }
| $degIncr+=$rotateDeg;
|
| unset($cmd);
| }
|
Well using -repage BEFORE reading an image is not a good idea.
To set the virtual canvas of an image being read in use -page
instead -repage is to change an image already in memory.
Are you sure you want -repage, and nor -resize, or better still
-thumbnail? In any case those are also done AFTER reading in an image.
For examples of thumbnails with shadows see IM Examples, thumbnails
http://www.imagemagick.org/Usage/thumbnails.
Also what format is the output image. JPEG and GIF is bad for soft
shadows. unless the last -background setting is an actual color!
Anthony Thyssen ( System Programmer ) <[email protected]>
-----------------------------------------------------------------------------
Opps. My Brain just hit a bad sector.
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users