Skip to main content

uniimage

Raster decoding, encoding, processing, and image metadata for Python, backed by the native UniImage engine written in Nim.

uniimage decodes images into owned 8-bit pixel buffers, resizes, crops, rotates, applies EXIF orientation, composites straight-alpha layers, encodes supported output formats, and extracts perceptual palettes. Its metadata surface reads, edits, and strips EXIF data without first decoding the pixels.

Install

pip install uniimage

Prebuilt wheels include the native UniImage library for Linux, macOS, and Windows on CPython 3.10–3.14. Installing a wheel needs neither Nim nor a C compiler.

Quick start

from pathlib import Path

import uniimage

image = uniimage.decode_buffer(Path("input.png").read_bytes())
resized = image.resize(800, 600, uniimage.FILTER_BILINEAR)
Path("output.jpg").write_bytes(
    resized.encode(uniimage.FMT_JPEG, quality=90)
)

metadata = uniimage.read_buffer(Path("photo.jpg").read_bytes())
print(metadata.orientation)
print(metadata.gps)
print(metadata.tags)

clean = uniimage.strip_buffer(Path("photo.jpg").read_bytes())
Path("photo.clean.jpg").write_bytes(clean)

The API accepts and returns bytes; file I/O stays under the caller's control. Image.pixels also returns a copy, so its lifetime is independent of the native buffer.

What's included

Category Python API
Decode and construct decode_buffer, image_from_pixels, thumbnail
Image inspection Image.width, height, channels, colorspace, pixels
Processing Image.resize, crop, rotate, orient, composite_over
Encoding Image.encode
Palette extraction Image.extract_palette, Palette, Color
Metadata read_buffer, edit_buffer, strip_buffer
ABI information version, abi_version, image_abi_version

Decoding supports PNG, JPEG, BMP, QOI, PNM/PAM, TGA, PCX, GIF, lossless WebP, and baseline TIFF. Encoding supports PNG, JPEG, BMP, QOI, PNM/PAM, and TGA. Pass FMT_TGA when decoding TGA because the format has no magic signature. Unsupported input and invalid operations raise ValueError.

Palette extraction exposes wu, kmeans, kmeansPP, medianCut, octree, and neuquant. Image.orient accepts the eight EXIF Orientation values. Image.composite_over mutates an RGBA destination; its source may be Gray, RGB, or straight-alpha RGBA, placement clips, and opacity is an integer from 0 to 255. Image.pixels remains a caller-owned bytes copy after the mutation.

For an executable tour of both raster and metadata operations, see the Python quickstart notebook.

Development

Building from source requires Nim, Nimble, a C compiler, Cython, and Python development headers.

nimble install -y
nimble pyLib
cd py
python3 setup.py build_ext --inplace
python3 -m pytest -q

On Windows, run the commands from a Developer Command Prompt and use python if python3 is not available. nimble pyLib builds the MSVC-compatible static library used by the extension.

An installation from the source distribution follows the same native build path and therefore also requires Nim and Nimble on PATH.

Metadata

Release files for uniimage 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uniimage 1.1.0
File Size Uploaded
uniimage-1.1.0.tar.gz 335.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for uniimage 1.1.0
File
uniimage-1.1.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
uniimage-1.1.0-cp314-cp314-manylinux_2_35_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.35+ x86-64 Details
uniimage-1.1.0-cp314-cp314-macosx_10_15_x86_64.macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 macOS 26.0+ ARM64, macOS 10.15+ x86-64 Details
uniimage-1.1.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
uniimage-1.1.0-cp313-cp313-manylinux_2_35_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.35+ x86-64 Details
uniimage-1.1.0-cp313-cp313-macosx_10_13_x86_64.macosx_26_0_arm64.whl CPython 3.13 CPython 3.13 macOS 26.0+ ARM64, macOS 10.13+ x86-64 Details
uniimage-1.1.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
uniimage-1.1.0-cp312-cp312-manylinux_2_35_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.35+ x86-64 Details
uniimage-1.1.0-cp312-cp312-macosx_10_13_x86_64.macosx_26_0_arm64.whl CPython 3.12 CPython 3.12 macOS 10.13+ x86-64, macOS 26.0+ ARM64 Details
uniimage-1.1.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
uniimage-1.1.0-cp311-cp311-manylinux_2_35_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.35+ x86-64 Details
uniimage-1.1.0-cp311-cp311-macosx_10_9_x86_64.macosx_26_0_arm64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64, macOS 26.0+ ARM64 Details
uniimage-1.1.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
uniimage-1.1.0-cp310-cp310-manylinux_2_35_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.35+ x86-64 Details
uniimage-1.1.0-cp310-cp310-macosx_26_0_arm64.macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 26.0+ ARM64, macOS 10.9+ x86-64 Details

Total release size: 12.7 MB

Release files / uniimage-1.1.0.tar.gz

Download URL uniimage-1.1.0.tar.gz
Size 335.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e0313525e701e534bd8238b4e37706c8209b1aa371438dd61761c03c1993d2f7
BLAKE2b-256 checksum
How to use checksums
cbba7036c626ac130fd668b4dee56309495b3a03b0786f63613a8ad2a37ab41a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / uniimage-1.1.0-cp314-cp314-win_amd64.whl

Download URL uniimage-1.1.0-cp314-cp314-win_amd64.whl
Size 568.1 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
cfc88ee7e811fcf0bf63d5cfaa73b494a211091e8fcec1175492c9aab0e1b05b
BLAKE2b-256 checksum
How to use checksums
0091d5aacc2d447fc90004040a3f4d5786aba2a16c66b6411f6e27b22c29301b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / uniimage-1.1.0-cp314-cp314-manylinux_2_35_x86_64.whl

Download URL uniimage-1.1.0-cp314-cp314-manylinux_2_35_x86_64.whl
Size 1.2 MB
Tags CPython 3.14 Linux glibc 2.35+ x86-64
SHA-256 checksum
How to use checksums
ccad16d05a94eca1040df313a0718328bd3354906367d299ff9ced65c549b287
BLAKE2b-256 checksum
How to use checksums
1805356da6603242e44b2d90ef1ba59fe440e9b06afbe2645fca9b14e4dbd684
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / uniimage-1.1.0-cp314-cp314-macosx_10_15_x86_64.macosx_26_0_arm64.whl

Download URL uniimage-1.1.0-cp314-cp314-macosx_10_15_x86_64.macosx_26_0_arm64.whl
Size 661.2 kB
Tags CPython 3.14 macOS 10.15+ x86-64 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
02b8790ddd9a306cf8858445c0c154eb54b56cc18b3ccac819676d7f2063327a
BLAKE2b-256 checksum
How to use checksums
114573c60cda47b7c4f92409da2c115300f6e6e8b718dab096c126af32ea5cef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / uniimage-1.1.0-cp313-cp313-win_amd64.whl

Download URL uniimage-1.1.0-cp313-cp313-win_amd64.whl
Size 552.0 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
22706db50f9f3044c4ccc3a4f612d6374718d2bcf2b13aa113a63f8c98a44944
BLAKE2b-256 checksum
How to use checksums
b7df9699a93a4647d11a11f9748f44f04f905a64377add502390c3c49933b2dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / uniimage-1.1.0-cp313-cp313-manylinux_2_35_x86_64.whl

Download URL uniimage-1.1.0-cp313-cp313-manylinux_2_35_x86_64.whl
Size 1.2 MB
Tags CPython 3.13 Linux glibc 2.35+ x86-64
SHA-256 checksum
How to use checksums
e23f3469629eaa66df8a2d91e3996b619d8eb1f8f280075b01146bff86f47a42
BLAKE2b-256 checksum
How to use checksums
e4e4b069db234e3ba9d68d9f1214fd3c8ff8f79116096aba85f46e184231eaae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / uniimage-1.1.0-cp313-cp313-macosx_10_13_x86_64.macosx_26_0_arm64.whl

Download URL uniimage-1.1.0-cp313-cp313-macosx_10_13_x86_64.macosx_26_0_arm64.whl
Size 661.9 kB
Tags CPython 3.13 macOS 10.13+ x86-64 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
fd6372eb26f00588bee56cc319c190aa6bbb6cce2fa7285822080811fa67947e
BLAKE2b-256 checksum
How to use checksums
7a27aa576e42bdcc31b6ae0228813937067763f0f8aa8fb99229021cf57d0f23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / uniimage-1.1.0-cp312-cp312-win_amd64.whl

Download URL uniimage-1.1.0-cp312-cp312-win_amd64.whl
Size 551.9 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
915c41dd016f2d63a9f900ef7cbab21d3e92987d43a396de4463397c4a9a5dc6
BLAKE2b-256 checksum
How to use checksums
107ff32a330c31c4d32e61eda1ced7956d48b1102de927e007ffbf3bbe52934c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / uniimage-1.1.0-cp312-cp312-manylinux_2_35_x86_64.whl

Download URL uniimage-1.1.0-cp312-cp312-manylinux_2_35_x86_64.whl
Size 1.3 MB
Tags CPython 3.12 Linux glibc 2.35+ x86-64
SHA-256 checksum
How to use checksums
897d0a9ab71c1ab2a427b61967f27f90b788f0b0e3c8b9a6e90c19b13dea3de6
BLAKE2b-256 checksum
How to use checksums
a915d0039f625e5a2d24e7b2302f8b4c87e60e41aad4575473e9ec673fa63f7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / uniimage-1.1.0-cp312-cp312-macosx_10_13_x86_64.macosx_26_0_arm64.whl

Download URL uniimage-1.1.0-cp312-cp312-macosx_10_13_x86_64.macosx_26_0_arm64.whl
Size 656.7 kB
Tags CPython 3.12 macOS 10.13+ x86-64 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
ba5b04ebddca78e7add278c31c87202411256f7d6112c619e35b6b38a192903c
BLAKE2b-256 checksum
How to use checksums
5634766cbcff9ed3be3ec71adcf645d2eaa17d707ec7d77bde4a3f090412327d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / uniimage-1.1.0-cp311-cp311-win_amd64.whl

Download URL uniimage-1.1.0-cp311-cp311-win_amd64.whl
Size 552.7 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
430fe2464735ee778385074af4acf0cc74cbfb9b304b3a3cfdabf06f29a8e8aa
BLAKE2b-256 checksum
How to use checksums
0f54b5d0ce415fec191c8c27bd1b831f3ace61d07f520b7203cca95cceaa7cfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / uniimage-1.1.0-cp311-cp311-manylinux_2_35_x86_64.whl

Download URL uniimage-1.1.0-cp311-cp311-manylinux_2_35_x86_64.whl
Size 1.3 MB
Tags CPython 3.11 Linux glibc 2.35+ x86-64
SHA-256 checksum
How to use checksums
07a08336da014f077e7ea6404fbbf5094e3a5e5bfaf9fb11d061a8709cb4a753
BLAKE2b-256 checksum
How to use checksums
8b665b3528c57760bb3bbfdc8586aa89aeb538de4ba75e9fba87dcd90d33d0d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / uniimage-1.1.0-cp311-cp311-macosx_10_9_x86_64.macosx_26_0_arm64.whl

Download URL uniimage-1.1.0-cp311-cp311-macosx_10_9_x86_64.macosx_26_0_arm64.whl
Size 662.8 kB
Tags CPython 3.11 macOS 10.9+ x86-64 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
1ff266bb9de0c4a1e3dd90669ef37df075d35d71fa9976884b9279831d9e44d8
BLAKE2b-256 checksum
How to use checksums
fc859e0bcd7db5415e682f90b355de40c9d10cf9c3fb877291f437606460404c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / uniimage-1.1.0-cp310-cp310-win_amd64.whl

Download URL uniimage-1.1.0-cp310-cp310-win_amd64.whl
Size 552.6 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
78b42617b06a9349bc4c0ac4bcafbea574ad2d85d03e17d56c0c4a35bfa9fc11
BLAKE2b-256 checksum
How to use checksums
415befa9ded4a673a71ae009e34777004f95cc232a6106e308f6c84628efd9ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / uniimage-1.1.0-cp310-cp310-manylinux_2_35_x86_64.whl

Download URL uniimage-1.1.0-cp310-cp310-manylinux_2_35_x86_64.whl
Size 1.2 MB
Tags CPython 3.10 Linux glibc 2.35+ x86-64
SHA-256 checksum
How to use checksums
426d00efcc4483b72e8d650f9ef056e03481c0fdec11da9ce0606c0105be6788
BLAKE2b-256 checksum
How to use checksums
a535165be66170f6022b76b69b71c4b263af6ff105fff7460487adf0065d4c4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / uniimage-1.1.0-cp310-cp310-macosx_26_0_arm64.macosx_10_9_x86_64.whl

Download URL uniimage-1.1.0-cp310-cp310-macosx_26_0_arm64.macosx_10_9_x86_64.whl
Size 663.4 kB
Tags CPython 3.10 macOS 10.9+ x86-64 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
23b739df8466f1d7bcc7f8791d91e0ec9d270329f26abb7e0f6ae9e24f811cac
BLAKE2b-256 checksum
How to use checksums
5e8a9d5e88e208029661c0e1bfa9924db31f84d1b978eafb69e0bce5b135dfc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

16 release files

1.0.0

19 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page