Making An ASCII-ART GENERATOR!? [PYTHON BEGINNER PROJECT TUTORIAL]

Making An ASCII-ART GENERATOR!? [PYTHON BEGINNER PROJECT TUTORIAL]

Raphson

4 года назад

26,775 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Akascape
Akascape - 10.06.2022 17:23

Hello, I have figured out the solution for the issue of converting some png images. It used to fail the process with only 32 bit png files because it cannot process the alpha channel of 32 bit depth. So just a simple solution is to change the line no.21 "im = Image.open('file.png')" with "im = Image.open('file.png').convert('RGB')" which will simply remove any alpha channel from the image.

Ответить
Drop
Drop - 19.01.2023 09:23

▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ▒▒▒▒ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██░░ ░░▒▒▒▒░░ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ░░░░░░░░░░ ░░▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ░░░░░░░░░░ ░░▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ██████▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ░░██ ▓▓▒▒████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ██ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓░░ ██ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓░░ ▒▒ ██▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒██░░ ██▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██░░ ██▒▒▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒
▒▒██ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ░░ ░░░░▒▒░░ ░░▓▓▓▓▒▒
▒▒██ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ░░░░▓▓
▒▒██ ██▒▒▒▒▒▒▒▒▒▒▒▒██ ░░░░ ██
▒▒██ ██▒▒▒▒▒▒▒▒▒▒▒▒██ ██████ ▒▒▒▒▒▒▒▒ ██
▒▒██ ██▒▒▒▒▒▒▒▒▒▒▒▒██ ▓▓▒▒▒▒██▓▓ ▒▒▒▒▒▒▒▒ ██
▒▒██ ██▒▒▒▒▒▒▒▒▒▒▒▒██ ██░░████ ██ ▒▒▒▒▒▒▒▒ ██▒▒
▒▒██ ██▒▒▒▒▒▒▒▒▒▒▒▒██ ██▓▓████ ██ ▒▒▒▒▒▒░░ ██▒▒
▒▒▒▒██ ██▒▒▒▒▒▒▒▒▒▒▒▒██ ████▒▒██▓▓▓▓██ ▒▒▒▒░░ ▒▒▓▓▒▒
▒▒▒▒██ ██▒▒▒▒▒▒▒▒▒▒██ ░░████████░░██ ░░░░ ██▒▒▒▒
▒▒▒▒▒▒██ ██▒▒▒▒████████ ░░▒▒▒▒████████░░ ██▓▓▓▓ ▓▓▓▓▒▒▒▒
▒▒▒▒▒▒██ ██▒▒██ ██ ░░▒▒▒▒░░ ██ ░░████ ▓▓▒▒▒▒▒▒▒▒
▒▒▒▒▒▒██ ████ ██ ░░░░ ▒▒ ████ ██░░██ ▓▓▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒██ ██ ██ ██░░██████░░██ ██▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒██ ████ ████░░████░░██ ██▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒██ ░░░░ ████▓▓████▓▓▒▒ ██▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒██ ████████▒▒░░░░ ▒▒▓▓▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒████ ░░▒▒▒▒░░ ██▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ░░░░ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ██ ▓▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ██████████████████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ████ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██ ▓▓██ ░░░░▓▓ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ██ ██ ░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████ ██ ██ ██ ██ ██ ██ ██ ████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████████████████▒▒████████████▒▒████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

Ответить
MOFOGAMINGTTV
MOFOGAMINGTTV - 05.07.2022 05:52

I'm stuck on how Python is able to get the amount of pixels/dimensions

Ответить
Hyper CSGOKL
Hyper CSGOKL - 26.06.2022 06:10

how do i add the image to the thing
i've got a jpeg, but i have no clue on how to add the image onto the project

Ответить
S_
S_ - 18.06.2022 12:56

I installed Pillow but its telling me that there isnt a module named "PIL"?

Ответить
Rois Anggung
Rois Anggung - 16.06.2022 08:27

can i make it using google collabs?

Ответить
Gmod and HL2 Experiments
Gmod and HL2 Experiments - 27.03.2022 02:03

help, my ver wont run and it's throwing a error

Ответить
anu gupta
anu gupta - 20.03.2022 12:18

lol u aslo copy paste programmer

Ответить
Magesh Kumar
Magesh Kumar - 07.10.2021 13:01

i am running this in visual studio code idk where my out put is

Ответить
qlmob
qlmob - 12.08.2021 13:53

What is your IDE?

Ответить
Văn Mạnh Trần
Văn Mạnh Trần - 03.08.2021 08:44

Thank you, guy! But I have one problem: how to print output on terminal instead of render png file? Thank again.

Ответить
Jackson Bernardo
Jackson Bernardo - 27.06.2021 05:26

Dude this is awesome! I cannoy believe that this program was made in Python :0

Ответить
R C
R C - 17.05.2021 08:51

How could you directly call the image file instead of changing the link within the source each time?

like:
asciipy image1.jpg new_outputnamehere.txt/jpg/md/whatever. or just cat output to terminal??

Ответить
El Fredo
El Fredo - 07.05.2021 17:29

l.,cxKWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
k. 'x00KNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNKkoc:oXMMMMM
Wk' .dK0OOOKNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWXK0OOo. .dNMMMMM
MMK:.c0KKK0kk0NMMMMMMMMMMMMMMMMMMMMMMMMMNKOOO0KKl. .xWMMMMMM
MMMNxcxKKKKK0kx0WMMMMMMMMMMMMMMMMMMMMWX0OO0KKKKO,.:0WMMMMMMM
MMMMMXOkOKKKKK0kOXMMMWNXXXXXXXNNWWMWX0O0KKKKKK0dlOWMMMWXK00O
MMMMMMWX0OO0KKKKOkKKK00OOOOOOOO000K0O0KKKKK0OOOKNNK00OOkkOkd
MMMMMMMMMNK0O0KK00O0KKKKKKKKKKKKKK00KKKK0O00O000OOkO0KKKKKOx
MMMMMMMMMMMWXKOk0KKKKKKKKKKKKKKKKKKKKK0kkOO0OkO0KKKKKKKKKKkO
MMMMMMMMMMMMMKk0KKKKKKKKKKKKKKKKKKKKKKKkdkO0KKKKKKKKKKKKK0k0
MMMMMMMMMMMMWOkKK0OO0KKKKKKKKKKKKKOkOKK0xOKKKKKKKKKKKKKKKOkX
MMMMMMMMMMMMW0kKx,:OOOKKKKKKKKKK0kOl'l0KkkKKKKKKKKKKKKKKKk0W
MMMMMMMMMMMMWOOKc..;;dKKKK00KKKKOc;'.,OKkkKKKKKKKK00OOOOO0NM
MMMMMMMMMMMMKxxOkdllx0KKKKOOKKKKKOolok00kdOK00O0000KKXNWWMMM
MMMMMMMMMMMWx;:clx0KKK0OOOkOO0000KKK0xolccxK0kkKWMMMMMMMMMMM
MMMMMMMMMMMWx;::::xKKK0OkkOOOOOO0KK0d::::;xKKKOkKNMMMMMMMMMM
MMMMMMMMMMMMNd:::ckKKKKKKKKKKKKKKKK0o:::;lk0KKK0OkKWMMMMMMMM
MMMMMMMMMMMMMWkclk0KKKKKKKKKKKKKKKKK0xlckKOxOKKKKOdkNMMMMMMM
MMMMMMMMMMMMMMKkOkkO0KKKKKKKKKKKKK0OOkkxk0OO00OO000XWMMMMMMM
MMMMMMMMMMMMMNOOKKK000KK0OOOO0KKK0OO0KKOxO0kkKXNWMMMMMMMMMMM
MMMMMMMMMMMMNOOKKKKKKKK00OOO0000KKKKKKKKkol:ckWMMMMMMMMMMMMM
MMMMMMMMMMWKkOKKKKKKKKK0O0KKKkdkKKKKKKKKKxldOKWMMMMMMMMMMMMM
MMMMMMMMMW0xOKKKKKKKKKK0kOKKOxxOKKKKKKKKKKOONMMMMMMMMMMMMMMM
MMMMMMWNNKkOK00KKKKKKKKKkkKKkx00KKKKKKKOOKKkONMMMMMMMMMMMMMM
MMMMMKkkOkx0KOk0KKKKKKKKkx0KkkKKKKKKKK0xOKKOdO0OKWMMMMMMMMMM
MMMMMXxdxkkOKKxx0KKKKKKKkdkkxOKKKKKKK0xkKKOkxkxd0WMMMMMMMMMM
MMMMMMNOodxkOK0xx0KKKKKKkoddokKKKKKK0xx0K0kkxdxKWMMMMMMMMMMM
MMMMMMMWKxddxkkxodOKKKKKxoddokKKKKK0dokOOkxodONMMMMMMMMMMMMM
MMMMMMMMMN0xdddodddk00OOkkOOxk0000OdoodddodOXMMMMMMMMMMMMMMM
MMMMMMMMMMMNOxxO0KKOOOO0NWMMWKOOOkkOOdlodkNMMMMMMMMMMMMMMMMM

Ответить
pranav sridhar
pranav sridhar - 03.05.2021 15:12

Hai,how to copy the path of the font?

Ответить
T E
T E - 02.05.2021 22:01

i dont understand what [::-1] does

you need to know i am very old

Ответить
fahad khan
fahad khan - 01.05.2021 18:49

Bro, i love the way u code

Ответить
Abhradeep Dey
Abhradeep Dey - 24.03.2021 21:04

Tyvm, i actually learnt some concepts of image processing

Ответить
Electrify Wiz
Electrify Wiz - 11.03.2021 14:40

im using pycharm to run this code..
but im not getting any output..

Ответить
salim
salim - 07.03.2021 10:46

Awesome i love python very nice video. Very cool. i subscribe to your channel. excuse my english im French .

Ответить
General Blorp
General Blorp - 27.02.2021 22:36

Great job!

Ответить
Sam Rafahya
Sam Rafahya - 26.02.2021 00:30

┋╭━━╮┋╱▔▔▔▔▔▔╲┋┋
╭╯┅▊┃▕╳╳╳R.I.P╳╳╳╲┋
╰━┳╯┃▕╳╳LONESOME╳╳╲
┋┋┃╯╰━╲╳╳GEORGE╳╳╱
┋┋╰━╱▔▔╲╳╳╳╳╳╳╱▏
┋┋┋▕┅▕━━╲▂▂▂▂╱┅▏
┋┋┋▕▂▂▏┋┋┋┋┋▕▂▂▏

Ответить
Bartek
Bartek - 07.02.2021 04:16

Is it possible to generate more pictures at the same time? For example, I have 100 images named 1.png, 2.png etc and would like to convert them to ascii faster than individually. What would I have to do in this case?

Ответить
Lazizkhan Khankhadjayev
Lazizkhan Khankhadjayev - 17.01.2021 14:12

Who can write that all codes to here

Ответить
csbluechip
csbluechip - 23.11.2020 03:18

Awesome ... It's like listening to the inside of my head while I'm coding LOL

Ответить
Modar Yaghi
Modar Yaghi - 15.09.2020 23:10

Oh, your coding skell is bad, though I loved the output.

Ответить
Aswin Jose
Aswin Jose - 12.09.2020 20:40

Hey just couldn't understand why do we use load? Is it similar to image.getdata

Ответить
Jiří Heištein
Jiří Heištein - 31.08.2020 20:36

no module PIL found ???

Ответить
Pablo Mora
Pablo Mora - 21.08.2020 03:41

Impressive! Man did u do it by your now? i mean did you check stackoverflow? im new to coding and these blows my mind! very abstract!

Ответить
usertech gamer
usertech gamer - 26.07.2020 14:25

how to fix
too many values to unpack?

Ответить
Paul Joshi
Paul Joshi - 06.07.2020 08:34

Dude this is Gold!!❤❤

Ответить
\
\ - 01.07.2020 02:25

Hey, man. Could you tell me how to pass your code so that the resulting image is black and white, not color?

Ответить
jsKings
jsKings - 12.04.2020 08:12

Awesome job!! I subbed...

Ответить
Richard Feynman
Richard Feynman - 25.03.2020 16:16

Круто, мужик! Я очень впечатлён.
Very cool man! I'm impressed.

Ответить
Sung Jun Eun
Sung Jun Eun - 15.01.2020 19:19

Nice video! but I have some problem following your intructions. I typed the exact thing like you and my txt file looks like its extended in up and down side.
what would be wrong with my file...? Also it seems side part of the characters are torn away

Ответить
Poki Hero
Poki Hero - 14.11.2019 02:08

New sub love your content!

Ответить