Skip to main content

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

image_file_converter-1.0.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

image_file_converter-1.0.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

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

Hashes for image_file_converter-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1a2ac3dfc9ae3fd1c2248019fd96923789f90c91096b97bab422fe21976b7bab
MD5 0f0378da9acb1c78913e07c7f7616697
BLAKE2b-256 59072ef9c42eddec135aa98f58dcfcd989c0a3d47f945c3eae1d4626020af77b

See more details on using hashes here.

File details

Details for the file image_file_converter-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for image_file_converter-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b50bdd65b2c99a6bcface22f4a0b2fb39be84ccfdf6d42ebe70c43fbcb6757f1
MD5 19ca093a0ae437610c491e32e646d7e9
BLAKE2b-256 f51e6aba487f4183491f781dea3bc8693466fded50d8e535b27452181c9e53db

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page