Skip to content

Extracts a monochromatic shape in the desired color from an image. Works as final TUI app and as Python library

License

Notifications You must be signed in to change notification settings

bglezseoane/monoshape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

monoshape

This program takes an image that has well differentiated light and dark tones and extracts its monochromatic shape in the desired colour with a transparent background.

Use demonstration

This sofware can be used as final TUI app or as Python library.

To set up

You can use Homebrew to install this program via my tap repository:

brew install glezseoane/homebrew-tap/monoshape

You also can use PyPI to install this program:

pip install monoshape

Alternative, clone and go to this repository home directory, and then run:

python setup.py install

Both methods install last monoshape stable version on your machine.

Use as final app

Simple use:

monoshape image.png desired_shape.png

Draw a red shape:

monoshape image.png desired_shape.png -rgb 255 0 0

Explore the man page to know all possible functionalities.

Use as library

Simply import main module and use export function:

import monoshape.__main__ as monoshape

drawn = monoshape.extract_shape(path=source,
                                black_background=False,
                                white_shape=False,
                                rgb_shape=False,
                                red=None,
                                green=None,
                                blue=None)

Read the man of this tool to known more about its use.

Note about man pages: if you use pip method to install this program, assert that man directories of your python environment are added to your MANPATH to can get this program's man pages with the man command. Python might install man pages in default machine level directories.

About

Extracts a monochromatic shape in the desired color from an image. Works as final TUI app and as Python library

Topics

Resources

License

Stars

Watchers

Forks