Code: Select all
$cmd2 = 'composite -compose src-over '.$headFile.' -matte -background none -rotate '.$rot.' -geometry '.$w.'x'.$h.$geomX.$geomY.' '.$ripPath .'/frame'.$i.'.jpg '.$outputDir.'/frame'.$i.'.jpg';
Code: Select all
$head = new Imagick( 'temp/frame' . $i . '.png' );
$frame->readImage( 'temp/frame' . $i . '.png' );
$tmpHead = $head->clone();
$tmpHead->thumbnailImage( $w, $h );
$tmpHead->rotateImage( 'transparent', $rot );
$frame->compositeImage( $tmpHead, Imagick::COMPOSITE_OVER, $x, $y );
$frame->writeImage( 'output/frame'.$i.'.jpg' );