Skip to main content

Python library to automatically align and crop your photos to the correct biometric passport photo size.

Project description

Photo ID Magick

Python library to automatically align and crop your photos to the correct biometric passport photo size.

This library is based on the libraries face_detection and Pillow.

Installation

$ pip install photoidmagick

Usage

$ photoidmagick -f sample_039.jpg -s 1750x2250
Traceback (most recent call last):
__main__.ObliqueFacePoseException: the midsagittal facial line doesn't intersect the midhorizontal iris line in the middle


$ photoidmagick -f sample_039.jpg -s 350x450 --allow-oblique-face
Original Passport Photo Format Square Photo Format
$ photoidmagick -f sample_054.jpg -s 400x400 --allow-oblique-face
Traceback (most recent call last):
__main__.UnevenlyOpenEyelidException: the right eye is more opened than the left eye

$ photoidmagick -f sample_054.jpg -s 1000x1000 --allow-oblique-face --allow-unevenly-open-eye
Original Passport Photo Format Square Photo Format

Project details


Download files

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

Source Distribution

photoidmagick-1.0.0.tar.gz (24.8 kB view hashes)

Uploaded Source

Built Distribution

photoidmagick-1.0.0-py3-none-any.whl (26.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page