Help out ffmpeg with Cropping an Image File(spec)

RJM Programming - April, 2019

Thanks to https://www.oodlestechnologies.com/blogs/Crop-and-scale-image-using-ffmpeg

Input Image File(spec):
Crop from Left: Top: ... by ... Width: and Height:
"; } else if (isset($_GET['awidth']) && isset($_GET['aheight']) && isset($_GET['aleft']) && isset($_GET['atop'])) { $replines=""; foreach (glob(str_replace("+", " ", urldecode($_GET['animage']))) as $ifil) { $ext = "." . explode(".", $ifil)[-1 + sizeof(explode(".", $ifil))]; $noext = str_replace($ext, "", $ifil); $suff = 0; while (file_exists(dirname(__FILE__) . '/' . $noext . "_" . $suff . $ext)) { $suff++; } $replines.="
Cropping " . $ifil . ' via ' . 'ffmpeg -i ' . $ifil . ' -vf "crop=' . str_replace("+", " ", urldecode($_GET['awidth'])) . ':' . str_replace("+", " ", urldecode($_GET['aheight'])) . ':' . str_replace("+", " ", urldecode($_GET['aleft'])) . ':' . str_replace("+", " ", urldecode($_GET['atop'])) . '" ' . $noext . "_" . $suff . $ext; exec('/usr/local/bin/ffmpeg -i ' . dirname(__FILE__) . '/' . $ifil . ' -vf "crop=' . str_replace("+", " ", urldecode($_GET['awidth'])) . ':' . str_replace("+", " ", urldecode($_GET['aheight'])) . ':' . str_replace("+", " ", urldecode($_GET['aleft'])) . ':' . str_replace("+", " ", urldecode($_GET['atop'])) . '" ' . dirname(__FILE__) . '/' . $noext . "_" . $suff . $ext); } echo " Help out ffmpeg with Cropping an Image File(spec) - RJM Programming - April, 2019 ... thanks to https://www.oodlestechnologies.com/blogs/Crop-and-scale-image-using-ffmpeg

Help out ffmpeg with Cropping an Image File(spec)

RJM Programming - April, 2019

Thanks to https://www.oodlestechnologies.com/blogs/Crop-and-scale-image-using-ffmpeg

" . $replines . "

Input Image File(spec):
Crop from Left: Top: ... by ... Width: and Height:
"; } ?>