Skip to main content

📸 Pixiverse: A lightweight, intuitive library for reading, processing, and saving images in all popular formats—effortlessly.

Project description

pixiverse

Pixiverse is a versatile image processing library designed to seamlessly handle various image formats. It includes useful utility functions for efficient image manipulation and transformation.


Installation

Install Pixiverse easily using pip:

pip install pixiverse

Main Features

1. Image Reading and Writing

Pixiverse allows users to effortlessly read from and write to diverse image formats including HEIF, AVIF, WebP, PNG, JPG, among others.

Reading Images

from pixiverse import imread

img = imread("image.heic")

Writing Images

from pixiverse import imwrite

imwrite("output.avif", img)

Supported Formats:

  • HEIF/HEIC
  • AVIF
  • WebP
  • PNG
  • JPG/JPEG
  • BMP
  • PGM

2. Image Utility Functions

Pixiverse includes a set of practical functions for creating and modifying images.

Create Blank Image

from pixiverse import from_blank

blank_img = from_blank(width=500, height=500, BGR=(255, 255, 255))

Load Image from URL

from pixiverse import from_url

img = from_url("https://example.com/image.png")

PIL Image Conversion

from pixiverse import from_pil, to_pil

pil_img = to_pil(img)
opencv_img = from_pil(pil_img)

Base64 Encoding and Decoding

from pixiverse import to_base64, from_base64

b64str = to_base64(img)
img_decoded = from_base64(b64str)

Resize Images

from pixiverse import resize

resized_img = resize(img, width=200)

Overlay Images

from pixiverse import overlay

overlay_img = overlay(bg_img, fg_img_with_alpha)

Image Padding

from pixiverse import center_pad, letterbox

padded_img = center_pad(img, width=500, height=500)
letterboxed_img = letterbox(img, value=0)

Concatenate Images

from pixiverse import hconcat, vconcat

horizontal_img = hconcat(img1, img2)
vertical_img = vconcat(img1, img2)

Edge Detection

from pixiverse import canny

edges_img = canny(img)

Usage Examples

Here is an example demonstrating image loading, resizing, and saving:

from pixiverse import imread, imwrite, resize

img = imread("input.heic")
resized_img = resize(img, width=1024)
imwrite("output.png", resized_img)

Another example illustrates fetching an image from a URL and encoding it to Base64:

from pixiverse import from_url, to_base64

img = from_url("https://example.com/photo.jpg")
b64_string = to_base64(img)

Enhance your image processing workflow effortlessly with Pixiverse.

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

pixiverse-0.0.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

pixiverse-0.0.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file pixiverse-0.0.1.tar.gz.

File metadata

  • Download URL: pixiverse-0.0.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for pixiverse-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9ba5e130daabe85da0fffdbb499396042befb8373ea2a6bc4ab8796854382f39
MD5 dd594987c1df630a4b0a0a858eba09bb
BLAKE2b-256 76bf1126c576be64722aec8ca49cb645116f14f9962cd71d06a5e4922cfbda51

See more details on using hashes here.

File details

Details for the file pixiverse-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pixiverse-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for pixiverse-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f6044798600ca27cb2c9f4b3cbc97795534a06e1a467907cec3fe252b716d060
MD5 e609b0bdc8dacf5de85ca912bedbcedb
BLAKE2b-256 f9c44152e0ad073749acc360b89f0a39f38c01d1cb3f33a6cefa7b5e280605e8

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