6,20c6 < $convertpath=""; < if (file_exists("/bin/convert")) { < $convertpath = "/bin/"; < } else if (file_exists("/home/virtfs/rjmprogr/usr/local/cpanel/3rdparty/bin/")) { < $convertpath = "/home/virtfs/rjmprogr/usr/local/cpanel/3rdparty/bin/"; < } else if (file_exists("/opt/local/bin/convert")) { < $convertpath = "/opt/local/bin/"; < } else if (1 == 1) { < $convertpath = "/home/virtfs/rjmprogr/usr/local/cpanel/3rdparty/bin/"; < } else { < $convertpath = ""; < } < < if ($convertpath == '') { $convertpath = "/home/virtfs/rjmprogr/usr/local/cpanel/3rdparty/bin/"; } < --- > $convertpath = ""; // fill in path to ImageMagick convert as necessary here 59,78d44 < $more=""; < if (isset($_POST['pdf']) || isset($_GET['pdf'])) { < $more=" if [ -f 'animated_gif_slide.png' ]; then\n " . $convertpath . "convert animated_gif_slide.png animated_gif_slide.pdf \n "; < $more.=" elif [ -f 'animated_gif_slide-0.png' ]; then\n "; < $more.=" cnt=0 \n"; < $more.=' while [ -f "animated_gif_slide-${cnt}.png" ]; do ' . "\n"; < $more.=' ' . $convertpath . "convert animated_gif_slide-${cnt}.png animated_gif_slide-${cnt}.pdf \n "; < $more.=" cnt=`expr $cnt + 1` \n"; < $more.=" done \n"; < $more.=" fi\n"; < } < file_put_contents("animated_gif_slides.ksh", '#!/bin/ksh' . "\n" . 'cd /home/rjmprogr/public_html/PHP; echo y > animated_gif_slide.png; echo y > animated_gif_slide.png; rm -f animated_gif_slide-*.pdf < animated_gif_slide.png 2> /dev/null; rm -f animated_gif_slide.pdf < animated_gif_slide.png 2> /dev/null; rm -f animated_gif_slide-*.png < animated_gif_slide.png 2> /dev/null; rm -f animated_gif_slide.png < animated_gif_slide.png 2> /dev/null; angle=' . $angle . '; scale=' . $scale . '; radians=`perl -e "print $angle * atan2(1,1)/45"` < sx=`python3 -c "import math; print (math.cos( $radians ) * $scale)"` < rx=`perl -e "print sin( $radians ) * $scale"` < ry=`python3 -c "print (-($rx))"` < sy="$sx" < ' . $convertpath . 'convert ' . $selname . ' -matte -virtual-pixel Transparent \ < -affine $sx,$rx,$ry,$sy,0,0 -transform +repage animated_gif_slide.png > affine_rotate_imagemagick.txt 2> affine_rotate_imagemagick.err' . "\n" . < $more . < "echo y > animated_gif_slides.ksh; rm -f animated_gif_slides.ksh < animated_gif_slides.ksh" . "\n"); 81c47 < sx=`python3 -c "import math; print (math.cos( $radians ) * $scale)"`; --- > sx=`python -c "import math; print math.cos( $radians ) * $scale"`; 83c49 < ry=`python3 -c "print (-($rx))"`; --- > ry=`python -c "print -($rx)"`; 147d112 < if (file_exists("animated_gif_slides.ksh")) unlink("animated_gif_slides.ksh"); 174d138 < if (file_exists("animated_gif_slides.ksh")) unlink("animated_gif_slides.ksh");