API Documentation
Main module.
- shrinkix.entrypoint(argv=None)[source]
Entrypoint for command line interface.
- Parameters:
argv (Sequence[str] | None) –
- Return type:
None
- class shrinkix.Shrinkix(*, format=None, keep_metadata=None, max_width=None, max_height=None, fast_color_reduction=None, verbose=False, artist=None, copyright=None)[source]
Bases:
object
- Parameters:
format (Literal['PNG', 'JPG'] | None) –
keep_metadata (bool | None) –
max_width (int | None) –
max_height (int | None) –
fast_color_reduction (bool | None) –
verbose (bool) –
artist (str | None) –
copyright (str | None) –
- __init__(*, format=None, keep_metadata=None, max_width=None, max_height=None, fast_color_reduction=None, verbose=False, artist=None, copyright=None)[source]
Instantiate Shrinkix.
- Parameters:
format (Literal['PNG', 'JPG'] | None) –
keep_metadata (bool | None) –
max_width (int | None) –
max_height (int | None) –
fast_color_reduction (bool | None) –
verbose (bool) –
artist (str | None) –
copyright (str | None) –
- Return type:
None
- shrink(image, output, colors=None)[source]
Shrink an image.
- Parameters:
image (str | Path | IO[bytes] | Image | ndarray[Any, dtype[Any]]) –
output (str | Path | IO[bytes]) –
colors (int | None) –
- Return type:
None