AnonymiseVFCommand::anonymiseTif PHP Метод

anonymiseTif() приватный Метод

Create a new image based on the image passed in and anonymise.
private anonymiseTif ( type $file, type $out )
$file type specified image file to anonymise; must be a valid path and the image must be the correct size.
$out type the directory to place the anonymised file.
    private function anonymiseTif($file, $out)
    {
        $image = new Imagick($file);
        $geo = $image->getImageGeometry();
        // only modify the main image, not the thumbnails:
        if ($geo['width'] == 2400 && $geo['height'] == 3180) {
            echo 'Modifying ' . $file . PHP_EOL;
            $this->fillImage($image);
            echo $out . PHP_EOL;
            $image->writeImage($file . '.tmp');
            copy($file . '.tmp', $out . '/' . basename($file, '.tif') . '.gif');
        }
    }