This is a module that can turn a picture into a pattern of letters and symbols.
Project description
photototext module is built on the basis of PIL and Numpy. It is simple and has only one function: change. It can open all kinds of pictures such as jpg, png, gif and so on that are supported by PIL. Then it will change the picture into a graph composed of characters and signs. Finally, the result will be returned as a string type. The introduction to this function change is as follows:
Function change has one parameter: file. It can automatically compress the change the picture once the path of the picture has been input to file. The result is a new graph composed of characters and signs.
For example, there is a jpg type of logo picture of Python at D(D:\python.jpg). The changing of the picture can be realized by typing:
import photototext as pt
text = pt.change('D:\python.jpg')
print(text)
The result is as follow:
...;;;---------;;;;..
.;-:!>>77??????CCCCCCCC??????77>>!:-;.
.;-!>7??CCCC??????????????????????????CCCC??7>!-;
;:>7?CC??????????????????????????????????????????CC?7>:;
;!7?C???????????????????????????????????????????????????CC?7:;
.:7?C??????????????????????????????????????????????????????????C?>-
-7C???????CC????CC????????????????????????????????????????????????CC7;
>C???????C7!-;;;;-!7C??????????????????????????????????????????????????:
>C????????:. .:??????????????????????????????????????????????????C:
-C????????- -???????????????????????????????????????????????????.
:C???????7 >?????????????????????????????????????????????????C-
:C????????. .7?????????????????????????????????????????????????C-
:C????????>. .>??????????????????????????????????????????????????C-
:C?????????7:; .:7C??????????????????????????????????????????????????C-
:C??????????C?7>!!>7?C????????????????????????????????????????????????????C-
!C?????????????CCCC???????????????????????????????????????????????????????C-
:C????????????????????????????????????????????????????????????????????????C-
!C????????????????????????????????????????????????????????????????????????C-
:?77777777777777777777777777777777777?????????????????????????????????????C-
................................... -????????????????????????????????????C-
-C???????????????????????????????????C-
.;:!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>7????????????????????????????????????C- .;;;;;;;;;;;;;;;;;;;;..
->??CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC?????????????????????????????????????C- ;:----------------------;.
:7C??????????????????????????????????????????????????????????????????????????????????????????????????????C- ;--------------------------.
-7C????????????????????????????????????????????????????????????????????????????????????????????????????????C- ;---------------------------;.
!????????????????????????????????????????????????????????????????????????????????????????????????????????????; ;-----------------------------.
>C????????????????????????????????????????????????????????????????????????????????????????????????????????????; ;------------------------------;
>C?????????????????????????????????????????????????????????????????????????????????????????????????????????????; ;-------------------------------;
!C??????????????????????????????????????????????????????????????????????????????????????????????????????????????. ;--------------------------------.
:C??????????????????????????????????????????????????????????????????????????????????????????????????????????????7. ;---------------------------------.
.???????????????????????????????????????????????????????????????????????????????????????????????????????????????C! ;----------------------------------
!C???????????????????????????????????????????????????????????????????????????????????????????????????????????????. -----------------------------------;
;????????????????????????????????????????????????????????????????????????????????????????????????????????????????- ;------------------------------------
!C??????????????????????????????????????????????????????????????????????????????????????????????????????????????- ;-------------------------------------.
7????????????????????????????????????????????????????????????????????????????????????????????????????????????C>. ;--------------------------------------;
;???????????????????????????????????????????????????????????????????????????????????????????????????????????C7: .-----------------------------------------
:C???????????????????????????????????????????????????????????????????????????????????????????????????????C?>: ;------------------------------------------.
!C????????????????????????????????????????????????????????????????????????????????????????CCCCC?C?CCCC??>:; ;--------------------------------------------.
>C?????????????????????????????????????????????????CCC???7777777777777777777777777>>>>>>>>>>>>>>>>>!!:;. .;----------------------------------------------;
>??????????????????????????????????????????????CC?7!:-;... .;;------------------------------------------------;
>????????????????????????????????????????????C?>-. ....;;----------------------------------------------------;
>???????????????????????????????????????????7:. ..;;-----------------------------------------------------------------------------------------------------;
!????????????????????????????????????????C7- .;----------------------------------------------------------------------------------------------------------.
:C???????????????????????????????????????: .;-------------------------------------------------------------------------------------------------------------.
;??????????????????????????????????????7; ;---------------------------------------------------------------------------------------------------------------
7????????????????????????????????????7. .----------------------------------------------------------------------------------------------------------------;
!C???????????????????????????????????; .-----------------------------------------------------------------------------------------------------------------.
.???????????????????????????????????7 ------------------------------------------------------------------------------------------------------------------
!C????????????????????????????????C> .-----------------------------------------------------------------------------------------------------------------.
.?????????????????????????????????C! .-----------------------------------------------------------------------------------------------------------------
-?????????????????????????????????! .----------------------------------------------------------------------------------------------------------------.
!C??????????????????????????????C! .---------------------------------------------------------------------------------------------------------------.
>C?????????????????????????????C! ;--------------------------------------------------------------------------------------------------------------;
!C????????????????????????????C! ;-------------------------------------------------------------------------------------------------------------;
:????????????????????????????C: ;------------------------------------------------------------------------------------------------------------.
;7C?????????????????????????C: ;----------------------------------------------------------------------------------------------------------;.
-7CC???????????????????????: ;--------------------------------------------------------------------------------------------------------;.
->7?CCCCCCCCCCCCCCCCCCC?C! ;------------------------------------------------------------------------------------------------------;.
.;-:!!>>>>>>>>>>>>>>>>>- ;-------------------------------------;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;..
;-------------------------------------
;-------------------------------------
;--------------------------------------------------------------------------.
;--------------------------------------------------------------------------.
;--------------------------------------------------------------------------.
;--------------------------------------------------------------------------.
;-------------------------------------------------------;;;;;--------------.
;----------------------------------------------------;. .;-----------.
;---------------------------------------------------; ----------.
;--------------------------------------------------; .---------.
;--------------------------------------------------; ---------.
.---------------------------------------------------. ;---------.
;---------------------------------------------------. .;---------;
;----------------------------------------------------;;....;;----------;
.--------------------------------------------------------------------.
.---------------------------------------------------------------;.
.;----------------------------------------------------------;.
.;;--------------------------------------------------;..
..;;----------------------------------------;;..
...;;;------------------------;;;...
................
Note: The graphics you see may be distorted,use “宋体” of “Terminal” fonts to see the result.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file photototext-0.0.2.tar.gz.
File metadata
- Download URL: photototext-0.0.2.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4336680c057351cdb85503cc7175710d96dc9c888d0771072f57f267dc62c26
|
|
| MD5 |
cd2ae62753b25fe60585f358448a1015
|
|
| BLAKE2b-256 |
2ed1757a8fd056850f1c17fd6e330ff4759158ff7c76ed856d98911654a04b6f
|
File details
Details for the file photototext-0.0.2-py3-none-any.whl.
File metadata
- Download URL: photototext-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
166c23115f666839950b3308a398a6e9ee5373f7670d4910d0c7144136eafb0b
|
|
| MD5 |
7f44f799598a0914638325d48740d225
|
|
| BLAKE2b-256 |
7f6de0a0ac4d11a4bbb121f52fac6d4caaf744788fbad6827ef6bc3ee8b2afc0
|