Git Product home page Git Product logo

pyimg's Introduction

pyimg - Extendable Command line image editor

I made this to help with the workflow of quickly cropping and enhancing images

How to use

pyimg has built in submodules such as Transform, Operations, Adjustments and Filters. To use the transform submodule just run the command:

$ python -m pyimg IMAGE_FILE transform METHOD 

IMAGE_FILE being the image you wish to change and METHOD being the method you want to use. To view avalible methods read the docs

You can do the same thing above for the Filters submodule

Arguments for methods

Some methods you will see require arguments, you can pass these in after the method just seperated by a space

$ python -m pyimg IMAGE_FILE transform METHOD foo bar

Docs

To view docs first install mkdocs with pip or conda then run python -m mkdocs serve

Plugins

You can create plugins just create a new .py file in the plugins folder.

In that file first import the plugins API

from plugins import BasePlugin

next create a class and have it inherit from BasePlugin with a blank constructor

class Foobar(BasePlugin):
    def __init__(self):
        pass

now you are free to add any method you want just make sure: it has the decorator @staticmethod, the first argument is the image being edited (a PIL Image class) and, returns the image at the end

Example:

@staticmethod
def print_width(image):
    print(image.width)
    return image

pyimg's People

Contributors

grqphical avatar

Watchers

 avatar

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.