Metadata-Version: 2.1
Name: fotolab
Version: 0.16.4
Summary: A console program that manipulate images.
Keywords: photography,photo
Author-email: Kian-Meng Ang <kianmeng@cpan.org>
Description-Content-Type: text/markdown
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Programming Language :: Python :: 3 :: Only
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
Classifier: Programming Language :: Python
Requires-Dist: pillow
Project-URL: Changelog, https://github.com/kianmeng/fotolab/blob/master/CHANGELOG.md
Project-URL: Issues, https://github.com/kianmeng/fotolab/issues
Project-URL: Source, https://github.com/kianmeng/fotolab

# fotolab

A console program to manipulate photos.

## Installation

Stable version From PyPI using `pipx`:

```console
pipx install fotolab
```

Stable version From PyPI using `pip`:

```console
python -m pip install fotolab
```

Upgrade to latest stable version:

```console
python3 -m pip install fotolab --upgrade
```

Latest development version from GitHub:

```console
python -m pip install -e git+https://github.com/kianmeng/fotolab.git
```

## Usage

```console
fotolab -h
```

```console
usage: fotolab [-h] [-o] [-op] [-od OUTPUT_DIR] [-q] [-v] [-d] [-V]
               {animate,auto,border,contrast,info,resize,rotate,montage,sharpen,watermark,env}
               ...

A console program to manipulate photos.

  website: https://github.com/kianmeng/fotolab
  changelog: https://github.com/kianmeng/fotolab/blob/master/CHANGELOG.md
  issues: https://github.com/kianmeng/fotolab/issues

positional arguments:
  {animate,auto,border,contrast,info,resize,rotate,montage,sharpen,watermark,env}
                    sub-command help
    animate         animate an image
    auto            auto adjust (resize, contrast, and watermark) a photo
    border          add border to image
    contrast        contrast an image
    info            info an image
    resize          resize an image
    rotate          rotate an image
    montage         montage a list of image
    sharpen         sharpen an image
    watermark       watermark an image
    env             print environment information for bug reporting

optional arguments:
  -h, --help        show this help message and exit
  -o, --overwrite   overwrite existing image
  -op, --open       open the image using default program (default: 'False')
  -od OUTPUT_DIR, --output-dir OUTPUT_DIR
                    set default output folder (default: 'output')
  -q, --quiet       suppress all logging
  -v, --verbose     show verbosity of debugging log, use -vv, -vvv for more details
  -d, --debug       show debugging log and stacktrace
  -V, --version     show program's version number and exit
```

### fotolab animate

```console
fotolab animate -h
```

```console
usage: fotolab animate [-h] [-f FORMAT] [-d DURATION] [-l LOOP]
                       IMAGE_FILENAMES [IMAGE_FILENAMES ...]

positional arguments:
  IMAGE_FILENAMES       set the image filenames

optional arguments:
  -h, --help            show this help message and exit
  -f FORMAT, --format FORMAT
                        set the image format (default: 'gif')
  -d DURATION, --duration DURATION
                        set the duration in milliseconds (default: '2500')
  -l LOOP, --loop LOOP  set the loop cycle (default: '0')
```

### fotolab auto

```console
fotolab auto -h
```

```console
usage: fotolab auto [-h] IMAGE_FILENAMES [IMAGE_FILENAMES ...]

positional arguments:
  IMAGE_FILENAMES  set the image filename

optional arguments:
  -h, --help       show this help message and exit
```

### fotolab border

```console
fotolab border -h
```

```console
usage: fotolab border [-h] [-c COLOR] [-w WIDTH] [-wt WIDTH] [-wr WIDTH]
                      [-wb WIDTH] [-wl WIDTH]
                      IMAGE_FILENAMES [IMAGE_FILENAMES ...]

positional arguments:
  IMAGE_FILENAMES       set the image filenames

optional arguments:
  -h, --help            show this help message and exit
  -c COLOR, --color COLOR
                        set the color of border (default: 'black')
  -w WIDTH, --width WIDTH
                        set the width of border (default: '10')
  -wt WIDTH, --width-top WIDTH
                        set the width of top border (default: '0')
  -wr WIDTH, --width-right WIDTH
                        set the width of right border (default: '0')
  -wb WIDTH, --width-bottom WIDTH
                        set the width of bottom border (default: '0')
  -wl WIDTH, --width-left WIDTH
                        set the width of left border (default: '0')
```

### fotolab contrast

```console
fotolab contrast -h
```

```console
usage: fotolab contrast [-h] [-c CUTOFF] IMAGE_FILENAMES [IMAGE_FILENAMES ...]

positional arguments:
  IMAGE_FILENAMES       set the image filename

optional arguments:
  -h, --help            show this help message and exit
  -c CUTOFF, --cutoff CUTOFF
                        set the percentage of lightest or darkest pixels to
                        discard from histogram (default: '1')
```

### fotolab info

```console
fotolab info -h
```

```console
usage: fotolab info [-h] IMAGE_FILENAME

positional arguments:
  IMAGE_FILENAME  set the image filename

optional arguments:
  -h, --help      show this help message and exit
```

### fotolab rotate

```console
fotolab rotate -h
```

```console
usage: fotolab rotate [-h] IMAGE_FILENAMES [IMAGE_FILENAMES ...]

positional arguments:
  IMAGE_FILENAMES  set the image filenames

optional arguments:
  -h, --help       show this help message and exit
```

### fotolab montage

```console
fotolab montage -h
```

```console
usage: fotolab montage [-h] IMAGE_FILENAMES [IMAGE_FILENAMES ...]

positional arguments:
  IMAGE_FILENAMES  set the image filenames

optional arguments:
  -h, --help       show this help message and exit
```

### fotolab resize

```console
fotolab resize -h
```

```console
usage: fotolab resize [-h] [-wh WIDTH | -ht HEIGHT]
                      IMAGE_FILENAMES [IMAGE_FILENAMES ...]

positional arguments:
  IMAGE_FILENAMES       set the image filename

optional arguments:
  -h, --help            show this help message and exit
  -wh WIDTH, --width WIDTH
                        set the width of the image (default: '600')
  -ht HEIGHT, --height HEIGHT
                        set the height of the image (default: '277')
```

### fotolab sharpen

```console
fotolab sharpen -h
```

```console
usage: fotolab sharpen [-h] [-r RADIUS] [-p PERCENT] [-t THRESHOLD]
                       IMAGE_FILENAMES [IMAGE_FILENAMES ...]

positional arguments:
  IMAGE_FILENAMES       set the image filenames

optional arguments:
  -h, --help            show this help message and exit
  -r RADIUS, --radius RADIUS
                        set the radius or size of edges (default: '1')
  -p PERCENT, --percent PERCENT
                        set the amount of overall strength of sharpening
                        effect (default: '100')
  -t THRESHOLD, --threshold THRESHOLD
                        set the minimum brightness changed to be sharpened
                        (default: '3')
```

### fotolab watermark

```console
fotolab watermark -h
```

```console
usage: fotolab watermark [-h] [-t WATERMARK_TEXT]
                         [-p {top-left,top-right,bottom-left,bottom-right}]
                         [-pd PADDING] [-fs FONT_SIZE] [-fc FONT_COLOR]
                         [-ow OUTLINE_WIDTH] [-oc OUTLINE_COLOR]
                         IMAGE_FILENAMES [IMAGE_FILENAMES ...]

positional arguments:
  IMAGE_FILENAMES       set the image filenames

optional arguments:
  -h, --help            show this help message and exit
  -t WATERMARK_TEXT, --text WATERMARK_TEXT
                        set the watermark text (default: 'kianmeng.org')
  -p {top-left,top-right,bottom-left,bottom-right}, --position {top-left,top-right,bottom-left,bottom-right}
                        set position of the watermark text (default: 'bottom-
                        left')
  -pd PADDING, --padding PADDING
                        set the padding of the watermark text relative to the
                        image (default: '15')
  -fs FONT_SIZE, --font-size FONT_SIZE
                        set the font size of watermark text (default: '12')
  -fc FONT_COLOR, --font-color FONT_COLOR
                        set the font color of watermark text (default:
                        'white')
  -ow OUTLINE_WIDTH, --outline-width OUTLINE_WIDTH
                        set the outline width of the watermark text (default:
                        '2')
  -oc OUTLINE_COLOR, --outline-color OUTLINE_COLOR
                        set the outline color of the watermark text (default:
                        'black')
```

### fotolab env

```console
fotolab env -h
```

```console
usage: fotolab env [-h]

options:
  -h, --help  show this help message and exit
```

## Copyright and License

Copyright (C) 2024 Kian-Meng Ang

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along
with this program. If not, see <https://www.gnu.org/licenses/>.

The fish logo used in the documentation generated by Sphinx is a public domain
drawing of male freshwater phase [Sockeye (red) salmon (Oncorhynchus nerka)]
(https://en.wikipedia.org/w/index.php?oldid=1186575702) from
<https://commons.wikimedia.org/entity/M2787002>.

