Metadata-Version: 2.4
Name: image-video-utils
Version: 1.0.1
Summary: Image and video utils...
Keywords: frames,image,metadata,video
Author: Nicolas MAIGNAN
Author-email: Nicolas MAIGNAN <nicolas.maignan@univ-lorraine.fr>
License-Expression: MIT
License-File: LICENSE
Requires-Dist: av>=14.4.0,<18.0.0
Requires-Dist: beartype>=0.22.9,<1.0.0
Requires-Dist: imageio>=2.37.2,<3.0.0
Requires-Dist: jaxtyping>=0.3.9,<1.0.0
Requires-Dist: rich>=14.2.0,<16.0.0
Requires-Dist: scikit-image>=0.25.2,<1.0.0
Requires-Dist: typer>=0.20.0,<1.0.0
Requires-Python: >=3.11
Project-URL: Documentation, https://image-video-utils-cf9507.gitlabpages.inria.fr
Project-URL: Repository, https://gitlab.inria.fr/anr-arce/utils/image-video-utils
Description-Content-Type: text/markdown

# Image & Video Utils

[![Python badge](https://img.shields.io/badge/Python-3.11+-0066cc?style=for-the-badge&logo=python&logoColor=yellow)](https://www.python.org/downloads/)
[![MIT License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge&)](https://spdx.org/licenses/MIT.html)

[![uv badge](https://gitlab.com/nifra/assets/-/raw/main/badges/uv.svg)](https://docs.astral.sh/uv/)
[![Ruff badge](https://gitlab.com/nifra/assets/-/raw/main/badges/ruff.svg)](https://docs.astral.sh/ruff/)
[![ty badge](https://gitlab.com/nifra/assets/-/raw/main/badges/ty.svg)](https://docs.astral.sh/ty/)
[![bear-ified](https://raw.githubusercontent.com/beartype/beartype-assets/main/badge/bear-ified.svg)](https://beartype.readthedocs.io)

This repository provides a Python module for interacting with image and video files using sensible defaults and clear, consistent interfaces.

## ✨ Features

- An `ImageResolution` class to represent the resolution of images or video frames.
- A `reshape` function to resize images easily.
- A `VideoMetadata` class to read video information such as the number of frames, frame rate, or codec.
- Multiple functions to read and write videos as NumPy arrays, image files, or video files.
- A simple CLI to extract frames or encode videos.

## 📦 Installation

### The module

You can install `image_video_utils` directly from source using `pip`:

```bash
pip install image-video-utils
```

You can also use another Python package manager such as `uv`:

```bash
uv add image-video-utils
```

### The CLI

You can install the CLI tool with [**`pipx`**](https://pipx.pypa.io/stable/) or [**`uv`**](https://docs.astral.sh/uv/):

```bash
uv tool install image-video-utils
```

## 🧪 Usage

### The module

Import the required utilities in your Python code:

```python
from image_video_utils.video import write_video_from_iterable
```

### The CLI

The CLI is available via:

```bash
ivutils --help
```

## 📚 Documentation

The documentation is generated using [**`pdoc`**](https://pdoc.dev/) and is available as a [GitLab Page](https://image-video-utils-cf9507.gitlabpages.inria.fr/).
