Skip to content

Commit

Permalink
Merge pull request #58 from 0xmayalabs/xenowits/example-docs
Browse files Browse the repository at this point in the history
book: crop command
  • Loading branch information
xenowits authored Feb 29, 2024
2 parents 2bc63e8 + 57870b1 commit 22f27c6
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions book/cli/crop.md
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.

0 comments on commit 22f27c6

Please sign in to comment.