Skip to main content

A Python Library for Image Processing

Project description

pypixel

This is a Python image process library

Feature

  • open and save an Image
  • show an Image
  • reshape an Image
  • convert RGB to Gray
  • convert RGB to Binary

Usage

Import package

from pypixel import Image

Open an Image

img = Image.open("filepath")

Save an Image

img = Image.open("filepath")
...
# Do something to img
...
img.save("filepath")

Show an Image

img = Image.open("filepath")
img.show()

Reshape an Image

img = Image.open("filepath")
img.reshape([height,width])

Convert to gray

img = Image.open("url")
img = img.gray()    # default : Float Algorithm
img = img.gray("F") # Float Algorithm : r*0.3+g*0.59+b*0.11
img = img.gray("G") # Green Only

Convert to binary

img = Image.open("url")
img = img.binary()

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

pypixel-1.0.1.tar.gz (2.1 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page