Giter Site home page Giter Site logo

daggy1234 / polaroid Goto Github PK

View Code? Open in Web Editor NEW
77.0 2.0 6.0 5.68 MB

Hyper Fast and safe image manipulation library for python . Powered by rust.

License: MIT License

Python 14.47% Rust 85.53%
pyo3 rust python image pypi fast photon photos manipulation library

polaroid's Introduction

Polaroid

Deployment Actions License Wheel Python Version Rust Report Chat Codacy Badge

Hyper fast image processing

This is a Work in Progress. Still working on it!

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)

Checklist

  • initial release

  • automated releases and pypi wheels

  • wheels for alpine linux

  • full documentation

  • benchmarks

  • image draw features

  • Stable release and promotion

polaroid's People

Contributors

daggy1234 avatar dependabot-preview[bot] avatar imgbotapp avatar tom-the-bomb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

polaroid's Issues

can't install via pip

execute
pip install -U Polaroid

result

Collecting Polaroid
  Downloading polaroid-0.3.2.tar.gz (11 kB)
  Installing build dependencies ... done
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

best regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.