Giter Site home page Giter Site logo

pyshred-pro's Introduction

Pyshred Pro v2.0 ✨️

Pyshred, now for images!

pyshred is a program which allows you to chop your image with some formulas.
in the 2.0 version, it's possible to change picture appearance to seems like charactered image🖼️.
Maryam Mirzakhani, a light in the dark! Maryam Mirzakhani, a light in the dark!

Install

for installing, first you should clone pyshred:

git clone https://github.com/pycdr/pyshred-pro

next, we need to install python packages which are written in requirements.txt via pip:

pip install -r requirements.txt

we're ready! start to use it! 🙂️

usage

just run this:

python3 run.py --input <path> --output <path>
# or
python3 run.py -i <path> -o <path>

where <path>s are the path of input/output file(e.g. image.png, pic.jpg, output.txt, ...)

notice that run this on pyshred-pro directory, or have config.json file in the directory.

how it works?

what are the files?

  • the main file of pyshred in run.py and it get your commands.
  • export.py and tools.py are other python files that main file use them.
  • config.json get some features(will be explained)

pyshred modes

here are 3 modes in pyshred-pro:

convert mode

convert image to designed text.
for example, if you want to convert input.jpg to output.txt the mode will be set on convert, and your command will be like this:

python3 run.py -i input.jpg -o output.txt

reconvert mode

convert designed text to image.
for example, if you want to convert input.txt to output.jpg the mode will be set on reconvert, and your command will be like this:

python3 run.py -i input.txt -o output.jpg

dualconvert mode

convert image to image, but output will be different from input!
the dualconvert mode, first convert image to text(convert mode), then convert taken text to image(reconvert mode).
for example, if you want to convert _input.jpg to output.jpg the mode will be set on reconvert, and your command will be like this:

python3 run.py -i input.jpg -o output.jpg

summary

from to mode command
image text convert python3 run.py -i input.jpg -o output.txt
text image reconvert python3 run.py -i input.txt -o output.jpg
image image dualconvert python3 run.py -i input.jpg -o output.jpg

config

when you run pyshred, it reads config.json to set some features.
by default, it's like this:

{
	"convert":{
		"output":{
			"width":"input",
			"height":"input"
		}
	},
	"reconvert":{
		"output":{
			"width":"input",
			"height":"input"
		}
	}
}

how it works

  • convert
    • output
      • width : width of output(e.g. 10,100,31,....)("input"=width of input)
      • height : height of output(e.g. 10,100,31,....)("input"=height of input)
  • reconvert
    • output
      • width : width of output(e.g. 10,100,31,....)("input"=width of input)
      • height : height of output(e.g. 10,100,31,....)("input"=height of input)

pyshred-pro's People

Contributors

lnxpy avatar pycdr avatar

Stargazers

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

Watchers

 avatar  avatar

Forkers

pycdr

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.