Skip to main content

macimg

A Python package for manipulating images using Objective-C frameworks.

Examples

Example 1: Applying Image Filters

from macimg import Image
from macimg.filters import (
    Bloom,
    Comic,
    Crystallize,
    Edges,
    Invert,
    Sepia,
    Vignette
)

# Load an image
img = Image("assets/Iceland1.jpg")
img.show_in_preview()

# Apply a single filter
Vignette(intensity=10).apply_to(img)
img.show_in_preview()

# Apply multiple filters
filters = [Comic(), Edges(), Invert(), Sepia(), Bloom(), Crystallize(crystal_size=50)]
for index, filter in enumerate(filters):
    filter.apply_to(img)
    img.show_in_preview()

The code above produces the following sequence of images: Images produced by applying several filters sequentially

Example 2: Applying Distortions

from macimg import Image
from macimg.distortions import (
    Bump,
    CircleSplash,
    Hole,
    LightTunnel,
    Pinch,
    TorusLens,
    Vortex,
)

# Load image
img = Image("assets/Iceland2.jpg")
img.show_in_preview()

# Apply multiple distortions
distortions = [Bump(radius=500, curvature=1), Vortex(radius=750, angle=1000.0), TorusLens(radius=1000, width=250), Hole(), Pinch(intensity=1), CircleSplash(), LightTunnel()]
for index, distortion in enumerate(distortions):
    distortion.apply_to(img)
    img.show_in_preview()

The code above produces the following sequence of images: Images produced by applying several distortions sequentially

Example 3: Applying Transformations

from macimg import Image
from macimg.transforms import (
    Flip,
    Rotate,
)

# Load image
img = Image("assets/Iceland3.jpg")
img.show_in_preview()

# Apply multiple transformations
transforms = [Flip("horizontal"), Flip("vertical"), Rotate(degrees=30)]
for index, transform in enumerate(transforms):
    transform.apply_to(img)
    img.show_in_preview()

The code above produces the following sequence of images: Images produced by applying multiple transformations sequentially

Metadata

Release files for macimg 0.0.3

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

Source distribution (sdist)

Source distribution for macimg 0.0.3
File Size Uploaded Provenance Actions
macimg-0.0.3.tar.gz 17.1 kB Without provenance Details for macimg-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for macimg 0.0.3
File Interpreter ABI Platform Actions
macimg-0.0.3-py3-none-any.whl Python 3 none any Details for macimg-0.0.3-py3-none-any.whl

Total release size: 36.1 kB

Release files / macimg-0.0.3.tar.gz

Download URL macimg-0.0.3.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
dd1ad39cecf96ed0b0232d267e71bc1ba7b5779864ac49227e8ee5c658a1820e
BLAKE2b-256 checksum
How to use checksums
dc3da262b1ed7a76b37c2db3d5f37c2e9f6a1e2cac1f162b07c515603a5145e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.0

Release files / macimg-0.0.3-py3-none-any.whl

Download URL macimg-0.0.3-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de1299c4ea7c2f7eee042f05f7c5680f067e8e1a6cb6783d3cf5c96cac8917e4
BLAKE2b-256 checksum
How to use checksums
976238fa474da72623ca3b3e10aa09a86b347b22a4e5cbd23dc0d012fbcd5583
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.0

Security for macimg 0.0.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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