Skip to main content

A tiny digital photographic utility.

Project description

Anshitsu

Testing

codecov

A tiny digital photographic utility.

"Anshitsu" means a darkroom in Japanese.

Usage

INFO: Showing help with the command 'anshitsu -- --help'.

NAME
    anshitsu - Process Runnner for Command Line Interface

SYNOPSIS
    anshitsu PATH <flags>

DESCRIPTION
    This utility converts the colors of images such as photos.

    If you specify a directory path, it will convert
    the image files in the specified directory.
    If you specify a file path, it will convert the specified file.
    If you specify an option, the specified conversion will be performed.

    Tosaka mode is a mode that expresses the preference of
    Tosaka-senpai, a character in "Kyūkyoku Chōjin R",
    for "photos taken with Tri-X that look like they were
    burned onto No. 4 or No. 5 photographic paper".
    Only use floating-point numbers when using this mode;
    numbers around 2.4 will make it look right.

POSITIONAL ARGUMENTS
    PATH
        Type: str
        Directory or File Path

FLAGS
    --colorautoadjust=COLORAUTOADJUST
        Type: bool
        Default: False
        Use colorautoadjust algorithm. Defaults to False.
    --colorstretch=COLORSTRETCH
        Type: bool
        Default: False
        Use colorstretch algorithm. Defaults to False.
    --grayscale=GRAYSCALE
        Type: bool
        Default: False
        Convert to grayscale. Defaults to False.
    --invert=INVERT
        Type: bool
        Default: False
        Invert color. Defaults to False.
    --tosaka=TOSAKA
        Type: Optional[typing.Un...
        Default: None
        Use Tosaka mode. Defaults to None.

NOTES
    You can also use flags syntax for POSITIONAL ARGUMENTS

Algorithm

RGBA to RGB Convert

Converts an image that contains Alpha, such as RGBA, to image data that does not contain Alpha. Transparent areas will be filled with white.

invert

Color inversion by pillow.

colorautoajust

Using "automatic color equalization" algorithm.

(References)

A. Rizzi, C. Gatta and D. Marini, "A new algorithm for unsupervised global and local color correction.", Pattern Recognition Letters, vol. 24, no. 11, 2003.

colorstretch

Using "stretch" algorithm after "gray world" algorithm.

(References)

D. Nikitenko, M. Wirth and K. Trudel, "Applicability Of White-Balancing Algorithms to Restoring Faded Colour Slides: An Empirical Evaluation.", Journal of Multimedia, vol. 3, no. 5, 2008.

grayscale

I implemented it based on the method described in this article.

Python でグレースケール(grayscale)化

Note: This article is written in Japanese.

Tosaka mode

Tosaka mode is a mode that expresses the preference of Tosaka-senpai, a character in "Kyūkyoku Chōjin R", for "photos taken with Tri-X that look like they were burned onto No. 4 or No. 5 photographic paper".

Only use floating-point numbers when using this mode; numbers around 2.4 will make it look right.

When this mode is specified, color images will also be converted to grayscale.

Special Thanks

We are using the following libraries.

shunsukeaihara/colorcorrect

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

anshitsu-1.1.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

anshitsu-1.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file anshitsu-1.1.0.tar.gz.

File metadata

  • Download URL: anshitsu-1.1.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0a2 CPython/3.10.1 Linux/5.11.0-1022-azure

File hashes

Hashes for anshitsu-1.1.0.tar.gz
Algorithm Hash digest
SHA256 e7ddbe85e29b748e8b1a7273e9149f82ee7711252218bc5c88a7391bc91751a7
MD5 2d0fb4d92b708cd78b2908f46815371a
BLAKE2b-256 166f560c45ed31d37538788b27648f60d7b416ae5f738ecdecfbebff8d1139cc

See more details on using hashes here.

File details

Details for the file anshitsu-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: anshitsu-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0a2 CPython/3.10.1 Linux/5.11.0-1022-azure

File hashes

Hashes for anshitsu-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cead9a931a3df533c1d0bc02f8c5d51f0b6dd7011d7353a83b9366a1cbaddf4e
MD5 54aed1853e7b7f1c085d566f410c6cfa
BLAKE2b-256 2e15f6b07407f2de97ba26a9dd0c7aa99e1d19d956a8fc5a9b5ad8981ff52097

See more details on using hashes here.

Supported by

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