Skip to main content

Smalltown Boy Photo Tools

Compare the displayed width, height, orientation and reduced aspect ratio of two local portraits. The command applies EXIF orientation before measuring the image, so a phone JPEG saved sideways is counted in its displayed orientation. It reads files locally and prints a JSON object with one record per input, in input order.

Command line

With Python 3.9 or newer, install the distribution with python -m pip install smalltown-boy-photo-tools. Then run:

smalltown-boy-photo-tools portrait-a.jpg portrait-b.jpg

For two images displayed at 900 by 1200 and 1200 by 900, the aspect ratios in the report are 3:4 and 4:3. Identical dimensions do not guarantee identical framing. Use the dimensions to plan your crop and inspect the subjects visually. The output also contains the original path, so review it before sharing a report.

Python

from smalltown_boy_photo_tools import analyze

for photo in analyze(["first.jpg", "second.jpg"])["photos"]:
    print(photo["path"], photo["width"], photo["height"], photo["aspect_ratio"])

If a command-line input is missing or unreadable the process exits with code 1. The library surfaces Pillow and filesystem errors to the caller. Neither interface changes the original files.

Choosing a pair

For a two-person dance, the Smalltown Boy AI portrait selection guide shows how framing and visibility affect the choice of two pictures. Use the guide with the local measurements to decide which portraits to take into the dance generator.

Metadata

Release files for smalltown-boy-photo-tools 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for smalltown-boy-photo-tools 0.1.0
File Size Uploaded Provenance Actions
smalltown_boy_photo_tools-0.1.0.tar.gz 3.5 kB Without provenance Details for smalltown_boy_photo_tools-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for smalltown-boy-photo-tools 0.1.0
File Interpreter ABI Platform Actions
smalltown_boy_photo_tools-0.1.0-py3-none-any.whl Python 3 none any Details for smalltown_boy_photo_tools-0.1.0-py3-none-any.whl

Total release size: 7.6 kB

Release files / smalltown_boy_photo_tools-0.1.0.tar.gz

Download URL smalltown_boy_photo_tools-0.1.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
546b38ae1f84cc1ce65bb70aed11ad2076d24ae0b5e859e38fb7cf50aeb94f76
BLAKE2b-256 checksum
How to use checksums
bdc2d0579e11adc93a96898832816c067e9c369287090f7b0d88068861143365
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.13

Release files / smalltown_boy_photo_tools-0.1.0-py3-none-any.whl

Download URL smalltown_boy_photo_tools-0.1.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2573593b0b4e955df05afd7a7da1ad82cfab4637ff491600cd1f6a8ad46b2be9
BLAKE2b-256 checksum
How to use checksums
1513c7e9ca6599cd7287b94f41f6b31989b9ffd9143dcb786c25796f1bf32018
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.13

Security for smalltown-boy-photo-tools 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page