Skip to content

Commit

Permalink
Add documentation for format conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
jrrodri committed Nov 25, 2018
1 parent 9cd26ec commit d616075
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ abraia optimize --width 333 --height 333 --filter desaturate images/lion.jpg ima

![Filtered lion](https://github.com/abraia/abraia-python/raw/master/images/filtered.jpg)

Moreover, images can be converted from one format to another changing the
filename extension for the destination file.

```sh
abraia optimize images/jaguar.png images/jaguar.jpg
```

## Fluent API

Abraia fluent API is the easiest way to compress and transform images with
Expand Down Expand Up @@ -117,12 +124,18 @@ abraia.from_store('demo/birds.jpg').resize(
All the operation parameters are automatically chosen to provide the best
results balancing quality and file size for a perfectly responsive website.

PNG images can significantly optimized also.
PNG and WebP images can significantly optimized also.

```python
abraia.from_file('images/jaguar.png').to_file('jaguar_o.jpg')
abraia.from_file('images/jaguar.png').to_file('jaguar.jpg')
```

![PNG Jaguar original](https://github.com/abraia/abraia-python/raw/master/images/jaguar.png)
![PNG Jaguar optimized](https://github.com/abraia/abraia-python/raw/master/images/jaguar_o.png)
![JPEG Jaguar optimized](https://github.com/abraia/abraia-python/raw/master/images/jaguar.jpg)

*Original PNG image (45KB) vs optimized PNG image (15.8KB)*
*Original PNG (45KB) vs optimized PNG (15.8KB) vs optimized JPEG (14.1KB)*

## License

Expand Down
Binary file added images/jaguar.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/jaguar.webp
Binary file not shown.

0 comments on commit d616075

Please sign in to comment.