PHP Classes

File: seqGen3.sample.php

Recommend this page to a friend!
  Classes of m a r c   PHP HD Images Search   seqGen3.sample.php   Download  
File: seqGen3.sample.php
Role: Example script
Content type: text/plain
Description: sample use of seqGen3 class
Class: PHP HD Images Search
Find HDR images and move to a separate directory
Author: By
Last change:
Date: 6 years ago
Size: 892 bytes
 

Contents

Class file image Download
<?php
/*
find all 3 pictures groups (to use for HDR) in a directory and move them in a "HDR3" directory
php seqGen3.sample.php [srcDir] [dstDir] [marchPct]
Ex: php seqGen3.sample.php MyPictures out 90
&copy; Marc Lapierre 03/2018 zlonka@gmail.com
*/
$usage="usage: php ".$argv[0]." srcDir [dstDir=HDR3] [pct=95] [silent=false]";
$usage.="\n find all 3 pictures groups for HDR (normal/darker/lighter) and move them to destDir.";
$usage.="\n pct is the pixel-matching percentage between pictures. If moving objects in pictures, try lower value (90,85,...).";

if (!isset(
$argv[1])) die($usage);
$dir=$argv[1];
$dir=str_replace("\\","/",$dir);

include(
"seqGen3.class.php");
$gen3=new seqGen3($dir);
if (isset(
$argv[2])) $gen3->setDirDest($argv[2]);
if (isset(
$argv[3])) $gen3->setPct(1*$argv[3]);
if (isset(
$argv[4])) $gen3->setVerbose($argv[4]!="false");
$gen3->doit();
?>