How to put the screens in one spright file.
-
There's a code that breaks videos by foot and keeps them in the time folder:
// временная папка $tmpPath = $_SERVER['DOCUMENT_ROOT'] . '/../tmp/' . md5(microtime()); // путь к видео $videoPath = $_SERVER['DOCUMENT_ROOT'] . '/video2.mp4'; mkdir($tmpPath, 0777); // вырезаем кадры exec("/usr/bin/ffmpeg -i $videoPath -an -y " . $tmpPath . "/%d.png");
How to select a few random personnel by changing the authorization
210x210px
And pour them into one long png?
-
dst_im: target image resource.
src_im: source image resource.
dst_x: x-coordinate of the resulting image.
dst_y: y-coordinate of the resulting image.
src_x: x-coordinate of the reference image.
src_y: y-coordinate of the original image.
src_w: Width of the reference image.
src_h: height of reference image.
bool imagecopymerge ( resource $dst_im , resource $src_im , int $dst_x , int $dst_y , int $src_x , int $src_y , int $src_w , int $src_h , int $pct )
// шаблонное изображение
$dest = imagecreatefrompng('vinyl.png');// обложка $src = imagecreatefromjpeg('cover.jpg'); // настройка прозрачности и фильтров imagealphablending($dest, false); imagesavealpha($dest, true); // объединение изображений imagecopymerge($dest, $src, 10, 9, 0, 0, 181, 180, 100); // сообщаем браузеру, что контент страницы будет image/png header('Content-Type: image/png'); // отображаем изображение imagepng($dest); // очищаем память imagedestroy($dest); imagedestroy($src);