Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lnxpy/pyshred-pro
🖼️ Let's Make a Binary Face
https://github.com/lnxpy/pyshred-pro
binary codec image-processing open-cv open-mag openmag pro pyshred pyshtred-pro
Last synced: 3 months ago
JSON representation
🖼️ Let's Make a Binary Face
- Host: GitHub
- URL: https://github.com/lnxpy/pyshred-pro
- Owner: lnxpy
- License: gpl-3.0
- Created: 2018-09-27T10:59:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-22T00:10:48.000Z (over 2 years ago)
- Last Synced: 2023-03-02T17:25:36.024Z (almost 2 years ago)
- Topics: binary, codec, image-processing, open-cv, open-mag, openmag, pro, pyshred, pyshtred-pro
- Language: Python
- Homepage:
- Size: 8.15 MB
- Stars: 15
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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!](https://raw.githubusercontent.com/pycdr/pyshred-pro/master/test/input_example.jpg "Maryam Mirzakhani")
![Maryam Mirzakhani, a light in the dark!](https://raw.githubusercontent.com/pycdr/pyshred-pro/master/test/output_example.jpg "Maryam Mirzakhani")
## 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 --output
# or
python3 run.py -i -o
```
where ````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:
```json
{
"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)