imagine_cli / imagine_cli
Command line tool for the Imagine library using the Symfony2 Console component
Installs: 1 806
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 17
Forks: 0
Open Issues: 0
Requires
- imagine/imagine: v0.4.1
- symfony/console: v2.2.1
This package is not auto-updated.
Last update: 2020-01-10 14:48:51 UTC
README
Command line interface for avalanche123/Imagine using the Symfony Console component. Mainly done to suit my own needs, so it may not have the features you need, but feel free to fork and send pull requests.
##Installation
###Using composer (only way for now)
add this to your composer.json
require: {
"imagine_cli/imagine_cli": "dev-master"
}
##Usage
crop using all options
Crop source.png, starting at the pixel at x=20, y=20, and crop out a size 400 pixels wide and 300 pixels high and save as destination.png
bin/imagine_cli crop source.png destination.png --cropx=20 --cropy=20 --cropwidth=400 --cropheight=300
all options are optional
Cropping can be done with only a couple of parameters set. For example, this crop will remove a 20 pixels from the left of the image
bin/imagine_cli crop source.png destination.png --cropx=20
resize
Resize an image to 400 pixels wide, and 300 pixels high
bin/imagine_cli resize source.png destination.png --width=400 --height=300
crop and resize
resize also takes the crop options so that the result of the crop will be resized. An example using all options:
bin/imagine_cli resize source.png destination.png --width=400 --height=300 --cropx=20 --cropy=20 --cropwidth=400 --cropheight=300
#More information
bin/imagine_cli help crop
and
bin/imagine_cli help resize
I will add more commands and/or options as I need them. Need more now? Fork! :-) WORK IN PROGRESS!