Metadata-Version: 2.1
Name: aspect-ratio-too
Version: 0.1.0
Summary: Aspect ratio calculations.
Author-email: Tim Santor <tsantor@xstudios.com>
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.6
Description-Content-Type: text/x-rst
License-File: AUTHORS.md
Provides-Extra: dev
Requires-Dist: black ; extra == 'dev'
Requires-Dist: pre-commit ; extra == 'dev'
Requires-Dist: flake8 ; extra == 'dev'
Requires-Dist: pylint ; extra == 'dev'
Requires-Dist: wheel ; extra == 'dev'
Requires-Dist: build ; extra == 'dev'

# Aspect Ratio Too


## Overview
Aspect ratio calculations.


## Development

    make env
    make reqs
    pip install -e .


## Installation

    pip install aspect-ratio-too


## Usage
Know the aspect ratio you want but don't know the corresponding width/height? Try this:

    from aspect_ratio_too import AspectRatioCalculator

    arc = AspectRatioCalculator(16, 9)

    # Get (width/height) tuple
    arc.width_to_dimensions(1920)  # (1920, 1080)
    arc.height_to_dimensions(1080)  # (1920, 1080)

    arc.width_to_height(1920)  # 1920
    arc.height_to_width(1080)  # 1080

Or calculate the aspect ratio given know pixel dimensions:

    from aspect_ratio_too import aspect_ratio, aspect_ratio_str

    aspect_ratio(1920, 1080)  # 1.7777777777777777

    aspect_ratio_str(1920, 1080)  # 16:9


## Issues

If you experience any issues, please create an [issue](https://bitbucket.org/xstudios/aspect-ratio-too/issues) on Bitbucket.

# History
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).

## 0.0.1 (2022-11-07)
* First release
