💾 Archived View for gem.sdf.org › s.kaplan › projects › macimg › macimg.gmi captured on 2023-12-28 at 15:49:23. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-09-08)

-=-=-=-=-=-=-

  ######   ##    ##
 ##    ##  ##   ##
 ##        ##  ##
  ######   #####
       ##  ##  ##
 ##    ##  ##   ##
  ######   ##    ##

macimg

macimg is a Python package for manipulating images using Objective-C frameworks.

View on GitHub URL

Support Development

Example: 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(i)

Example 1

Example 2

Example 3

[root]