Created
March 20, 2015 13:41
-
-
Save yurukov/0d9f442b82c991f88fb8 to your computer and use it in GitHub Desktop.
Cut a tif file with data to the borders of Bulgaria
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$file = $argv[1]; | |
echo date('H:i:s')."\n"; | |
$image = new Imagick($file); | |
echo date('H:i:s')."\n"; | |
$image->cropImage(25000,11900,9440,23160); | |
$image->writeImage('cut_'.$file); | |
echo date('H:i:s')."\n"; | |
$image->resizeImage(1200,0,Imagick::FILTER_LANCZOS,1); | |
$image->setImageFormat('JPG'); | |
$image->writeImage('cut_'.$file.'.jpg'); | |
echo date('H:i:s')."\n"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment