The simpler media website CMS
$shadow=$im->clone();
$shadow->setImageBackgroundColor( new ImagickPixel( 'black' ) );
$shadow->shadowImage( 60, 4, 4, 4 );
$shadow->compositeImage( $im, Imagick::COMPOSITE_OVER, 0, 0 );
$bg = $shadow->clone();
$bg->colorFloodFillImage("white", 100, '#777777', 0, 0);
$bg->compositeImage($shadow, Imagick::COMPOSITE_OVER, 0, 0);
$bg->flattenImages();
// wrong place - should be for $im not $bg
$d = $bg->getImageGeometry();
$w = $d['width'];
$h = $d['height'];
$amplitude = $w * 0.01;
$wavelength = $h * (rand(5) + 5);
$bg->rotateImage("white",90);
$bg->waveImage($amplitude, $wavelength);
$bg->rotateImage("white",-90);
$rand_angle=rand(1,7); // get random angle
$rand_sign=rand(0,1); // - +
if ($rand_sign == 0) { $rand_angle = - $rand_angle; }
$bg->rotateImage("white",$rand_angle);
return $bg->writeImages($filename, true);
`
Could someone give me some directions for which hook should I use to move code to a plugin?
Thanks,
Milosz
Comments
On mentioned website there is a http://www.netzgesta.de/instant/ instant.js script that can achieve such effect so I can move to it later.
Happy evening!