Skip to content

Commit

Permalink
Add jpegopt to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Belval committed Dec 19, 2019
1 parent 273efb5 commit 213411b
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ convert_from_path(
output_folder=None,
first_page=None,
last_page=None,
jpegopt=None,
fmt="ppm",
jpegopt=None,
thread_count=1,
userpw=None,
use_cropbox=False,
Expand Down Expand Up @@ -78,6 +78,22 @@ Last page that will be converted. `last_page=2` will skip all pages after page 2

File format or the output images. Supported values are `ppm`, `jpeg`, `png` and `tiff`.

**jpegopt**

Configuration for the jpeg output format. As such, only used with `fmt='jpeg'`.

```
jpegopt={
"quality": 100,
"progressive": True,
"optimize": True
}
```

- `quality`: Selects the JPEG quality value. The value must be an integer between 0 and 100.
- `progressive`: Select progressive JPEG output. The possible values are `True`, `False`, indicating progressive (yes) or non-progressive (no), respectively.
- `optimize`: Sets whether to compute optimal Huffman coding tables for the JPEG output, which will create smaller files but make an extra pass over the data. The value must be `True` or `False`, with `True` performing optimization, otherwise the default Huffman tables are used.

**thread_count**

Number of threads to use when converting the PDF. Limited to the actual number of pages.
Expand Down

0 comments on commit 213411b

Please sign in to comment.