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
Metadata
Release files for image-file-converter 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| image_file_converter-1.0.1.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| image_file_converter-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.7 kB
Release files / image_file_converter-1.0.1.tar.gz
| Download URL | image_file_converter-1.0.1.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a2ac3dfc9ae3fd1c2248019fd96923789f90c91096b97bab422fe21976b7bab
|
|
BLAKE2b-256 checksum How to use checksums |
59072ef9c42eddec135aa98f58dcfcd989c0a3d47f945c3eae1d4626020af77b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.8
|
Release files / image_file_converter-1.0.1-py3-none-any.whl
| Download URL | image_file_converter-1.0.1-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b50bdd65b2c99a6bcface22f4a0b2fb39be84ccfdf6d42ebe70c43fbcb6757f1
|
|
BLAKE2b-256 checksum How to use checksums |
f51e6aba487f4183491f781dea3bc8693466fded50d8e535b27452181c9e53db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.8
|