Toolkit for converting image files
Project description
Toolkit for converting image files
Installation
python -m pip install image_file_converter
Usage in Python
from image_file_converter.core import ImageFileConverter
# convert pdf to image or data_url
input_file = 'tests/test.pdf
converter = ImageFileConverter(input_file, dpi=300, max_page=5)
converter.to_image('output.png')
converter.to_image('output.jpg')
data_url = converter.to_data_url()
print(data_url)
# convert image to pdf or data_url
input_file = 'tests/test.png'
converter = ImageFileConverter(input_file)
converter.to_pdf('output.pdf')
data_url = converter.to_data_url()
print(data_url)
Usage in CMD
image_file_converter --help
image_file_converter --version
# convert pdf to image
image_file_converter to_image tests/test.pdf -o output.png
image_file_converter to_image tests/test.pdf -o output.jpg
image_file_converter to_image tests/test.pdf -o output.png --dpi 300 --max-page 5
# convert image to pdf
image_file_converter to_pdf tests/test.png -o output.pdf
image_file_converter to_pdf tests/test.jpg -o output.pdf
# convert image or pdf to data_url
image_file_converter to_data_url tests/test.png
image_file_converter to_data_url tests/test.pdf
image_file_converter to_data_url tests/test.pdf --dpi 300 --max-page 5
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file image_file_converter-1.0.1.tar.gz.
File metadata
- Download URL: image_file_converter-1.0.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a2ac3dfc9ae3fd1c2248019fd96923789f90c91096b97bab422fe21976b7bab
|
|
| MD5 |
0f0378da9acb1c78913e07c7f7616697
|
|
| BLAKE2b-256 |
59072ef9c42eddec135aa98f58dcfcd989c0a3d47f945c3eae1d4626020af77b
|
File details
Details for the file image_file_converter-1.0.1-py3-none-any.whl.
File metadata
- Download URL: image_file_converter-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b50bdd65b2c99a6bcface22f4a0b2fb39be84ccfdf6d42ebe70c43fbcb6757f1
|
|
| MD5 |
19ca093a0ae437610c491e32e646d7e9
|
|
| BLAKE2b-256 |
f51e6aba487f4183491f781dea3bc8693466fded50d8e535b27452181c9e53db
|