-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from 0xmayalabs/xenowits/example-docs
book: crop command
- Loading branch information
Showing
1 changed file
with
25 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,32 @@ | ||
## Crop | ||
|
||
To prove that an image is cropped correctly, run: | ||
To run sample code, follow these steps: | ||
1. Clone the [maya-cli](https://github.com/0xmayalabs/maya-cli) repository | ||
```shell | ||
git clone https://github.com/0xmayalabs/maya-cli.git | ||
``` | ||
2. Cd into the directory | ||
```shell | ||
cd maya-cli | ||
``` | ||
3. To prove that an image is cropped correctly, run: | ||
```shell | ||
docker run --rm -v "$(pwd):/opt/maya" 0xmayalabs/maya-cli:latest prove crop \ | ||
--original-image=./sample/original.png \ | ||
--cropped-image=./sample/cropped.png \ | ||
--height-start-new=0 \ | ||
--width-start-new=0 \ | ||
--proof-dir=proofs | ||
``` | ||
4. To verify that an image is cropped correctly, run: | ||
```shell | ||
docker run --rm -v "$(pwd):/opt/maya" 0xmayalabs/maya-cli:latest prove crop \ | ||
--original-image=./sample/original.png \ | ||
docker run --rm -v "$(pwd):/opt/maya" 0xmayalabs/maya-cli:latest verify crop \ | ||
--cropped-image=./sample/cropped.png \ | ||
--height-start-new=0 \ | ||
--width-start-new=0 \ | ||
--proof-dir=proofs | ||
``` | ||
|
||
To verify that an image is cropped correctly, run: | ||
```shell | ||
docker run --rm -v "$(pwd):/opt/maya" 0xmayalabs/maya-cli:latest verify crop \ | ||
--cropped-image=./sample/cropped.png \ | ||
--proof-dir=proofs | ||
``` | ||
Please note that the repository contains sample images that you can use to get started quickly, | ||
but you don't need to clone the repository to run the `prove` or `verify` commands. | ||