MCPcopy Index your code
hub / github.com/daggy1234/polaroid

github.com/daggy1234/polaroid @v0.3.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.2 ↗ · + Follow
143 symbols 280 edges 19 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Polaroid

Deployment Actions License Wheel Python Version Rust Report Chat Codacy Badge

Hyper fast image processing

This is a Work in Progress. DO NOT USE in production.

For all the examples, meme.png is used. Please replace that with whatever Image you use

Via File System

from polaroid import Image
im = Image("meme.png")
im.solarize()
im.save("solar.png")

Using Bytes

# Just an example use any library to supply bytes
from polaroid import Image
import requests
byt = requests.get("https://dagpi.xyz/dagpi.png").content
im = Image(byt)
im.filter("dramatic")
ret_byt = im.save_bytes()

Properties

from polaroid import Image
im = Image("meme.png")
h = im.height
w = im.weight
wi,hei = im.size
image_format = im.format
mode = im.mode

Using the RGB class for coloring

from polaroid import Image, Rgb
im = Image("meme.png")
# Color Rgb 
color = Rgb(78, 93, 148)
im.color(color)

# Now Save

Methods

Image Methods

['add_noise_rand', 'adjust_contrast', 'alter_blue_channel', 'alter_channel', 'alter_channels', 'alter_green_channel', 'alter_red_channel', 'apply_gradient', 'b_grayscale', 'blend', 'box_blur', 'brighten', 'color', 'color_no_grayscale', 'colorize', 'crop', 'decompose_max', 'decompose_min', 'desaturate', 'detect_horizontal_lines', 'detect_vertical_lines', 'edge_detection', 'edge_one', 'emboss', 'filter', 'fliph', 'flipv',  'g_grayscale', 'gaussian_blur', 'gradient', 'grayscale', 'grayscale_human_corrected', 'grayscale_shades',  'hog', 'horizontal_strips', 'identity', 'inc_brightness', 'invert', 'laplace', 'liquid_rescale',  'monochrome', 'noise_reduction', 'offset', 'offset_blue', 'offset_green', 'offset_red', 'oil', 'pink_noise', 'prewitt_horizontal', 'primary', 'r_grayscale', 'remove_blue_channel', 'remove_green_channel', 'remove_red_channel', 'replace_backround', 'resize', 'rotate180', 'rotate270', 'rotate90', 'save', 'save_base_64', 'save_bytes', 'save_jpeg_bytes', 'selective_desaturate', 'selective_hue_rotate', 'selective_lighten', 'selective_saturate', 'sepia', 'sharpen', 'single_channel_grayscale', 'sobel_horizontal', 'sobel_vertical', 'solarize', 'swap_channels', 'threshold', 'thumbnail', 'tint', 'unsharpen', 'vertical_strips', 'watermark']
#All available for Image

Rgb Methods


Special Methods for Image

from polaroid import Image
im = Image("meme.png")
print(repr(im))

#The `bytes` method is not implemented use
byt = im.save_bytes()

# Save a jpeg

im.save_jpeg(quaility: int)

byt = im.save_jpeg_bytes(quality: int)

Core symbols most depended-on inside this repo

height
called by 19
src/image.rs
width
called by 19
src/image.rs
extract_rgb
called by 10
src/rgb.rs
save
called by 5
src/image.rs
to_image_rgba
called by 4
src/rgb.rs
open
called by 3
src/gif.rs
resize
called by 3
src/transformations.rs
solarize
called by 3
src/effects.rs

Shape

Method 114
Function 23
Class 6

Languages

Rust90%
Python10%

Modules by API surface

src/image.rs16 symbols
src/effects.rs16 symbols
src/rgb.rs15 symbols
src/conv.rs15 symbols
tests/benchmark.py14 symbols
src/monochrome.rs13 symbols
src/channels.rs13 symbols
src/transformations.rs9 symbols
src/drawing.rs8 symbols
src/gif.rs6 symbols
src/colorize.rs6 symbols
src/multiple.rs5 symbols

For agents

$ claude mcp add polaroid \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page