| @@ 25-33 (lines=9) @@ | ||
| 22 | parent::__construct(); |
|
| 23 | } |
|
| 24 | ||
| 25 | protected function configure() |
|
| 26 | { |
|
| 27 | $this->setName('compare') |
|
| 28 | ->setDescription('Compare two images and outputs how similar they are') |
|
| 29 | ->addArgument('file1', InputArgument::REQUIRED, 'Pass the first file.') |
|
| 30 | ->addArgument('file2', InputArgument::REQUIRED, 'Pass the second file.') |
|
| 31 | ->addOption('size', 's', InputOption::VALUE_REQUIRED, 'Sampling size.', 8) |
|
| 32 | ->addOption('format', 'f', InputOption::VALUE_REQUIRED, 'Output format.', 'percent'); |
|
| 33 | } |
|
| 34 | ||
| 35 | protected function execute(InputInterface $input, OutputInterface $output) |
|
| 36 | { |
|
| @@ 25-32 (lines=8) @@ | ||
| 22 | parent::__construct(); |
|
| 23 | } |
|
| 24 | ||
| 25 | protected function configure() |
|
| 26 | { |
|
| 27 | $this->setName('generate') |
|
| 28 | ->setDescription('Generates the pHash of given image') |
|
| 29 | ->addArgument('file', InputArgument::REQUIRED, 'Pass the file.') |
|
| 30 | ->addOption('size', 's', InputOption::VALUE_REQUIRED, 'Sampling size.', 8) |
|
| 31 | ->addOption('format', 'f', InputOption::VALUE_REQUIRED, 'Output format [hex,bin,ascii].', 'hex'); |
|
| 32 | } |
|
| 33 | ||
| 34 | protected function execute(InputInterface $input, OutputInterface $output) |
|
| 35 | { |
|