Turn any image into ASCII art! (Easy Python PIL Tutorial)

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ค. 2024
  • This Python beginner tutorial shows you how to use the Python Image Library to build a short, interactive script to convert any image to ASCII art using the Python Image Library.
    ⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. We made this TH-cam channel and Kite to help you be more productive: kite.com/download/?...
    ***************************************
    JOIN our community of developers ► / 505658083720291
    SUBSCRIBE for more Python tips, tutorials, and coding interview prep! ► th-cam.com/users/KiteHQ?sub_...
    Follow us Twitter ► / kitehq
    Github Repo ► github.com/kiteco/python-yout...
    ***************************************
    ADDITIONAL BEGINNER RESOURCES:
    6 Python Tips and Tricks YOU Should Know ►
    • 6 Python Tips and Tric...
    Push- Up Bot?! Make a Discord Bot in Python [step-by-step tutorial] ►
    • Push- Up Bot?! Make a...
    How to Build HANGMAN in 10 Minutes (Python tutorial) ►
    • How to build HANGMAN w...
    ***************************************
    Don’t forget to subscribe :)
    th-cam.com/users/KiteHQ?sub_...
    STAY TUNED:
    Kite ► kite.com/
    Twitter ► / kitehq
    TH-cam ► / @kitehq
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 261

  • @KiteHQ
    @KiteHQ  4 ปีที่แล้ว +50

    If you guys made it to the comments, let us know what images you turn (or want to turn) into a ASCII art!

    • @nassimnedjar2063
      @nassimnedjar2063 4 ปีที่แล้ว

      it works so good!!

    • @nassimnedjar2063
      @nassimnedjar2063 4 ปีที่แล้ว

      I don't know how to put images in comments using TH-cam, but it's so fine !! good job man!!

    • @malar5421
      @malar5421 3 ปีที่แล้ว

      I got my script working after a long time.But it works really great.
      :-)

    • @humptydumpty6323
      @humptydumpty6323 3 ปีที่แล้ว

      I have a problem showing in sublime. It is showing :-
      AttributeError: 'NoneType' object has no attribute 'convert'. I am using ubuntu

    • @malar5421
      @malar5421 3 ปีที่แล้ว

      @@humptydumpty6323 can you please share your full trace back message?

  • @hobbycaptain8792
    @hobbycaptain8792 2 ปีที่แล้ว +4

    This is video is great. I have been critiquing my coding in an attempt to improve, and my style is similar to yours and works very well for clean clear writing and editing but doesn't seem to be the norm. I think that people could learn a lot from you. Thank you.

  • @martinmartin8894
    @martinmartin8894 3 ปีที่แล้ว +70

    Great tutorial! To maintain the image aspect ratio in ascii format i modified the ratio line of code:
    ratio = height / width / 1.65
    Thank You!

    • @Canttakethatback
      @Canttakethatback 3 ปีที่แล้ว

      worked for me thanks! but what does 1.65 stand for

    • @martinmartin8894
      @martinmartin8894 3 ปีที่แล้ว +10

      @@Canttakethatback Ascii characters hight and width are not equal. Hight is about 1.65 times bigger than width - depending on display. So to compensate that, i added / 1.65

    • @__blank__4193
      @__blank__4193 3 ปีที่แล้ว

      With value 2 it's much better

    • @davisionairy4680
      @davisionairy4680 3 ปีที่แล้ว

      @@Canttakethatback How do you actually do this? I tried to do a image of a celebrity to make my friend laugh. But when I copy n paste it doesnt work

    • @jasonreichert2430
      @jasonreichert2430 2 ปีที่แล้ว

      That worked out perfectly for exactly what I needed. Big time thank you!

  • @financerunner
    @financerunner 3 ปีที่แล้ว +3

    Hi Kite, I’m trying to use a livestream webcam, possibly around 1 sample per second, and covert the text in a defined region to ASCII to be stored in a csv. I’m very very new to python and so I’m wondering if you know how I might go about that

  • @mohamedpedrou2898
    @mohamedpedrou2898 3 ปีที่แล้ว +4

    Such an underrated channel
    You deserve better

  • @tanercoder1915
    @tanercoder1915 4 ปีที่แล้ว +3

    interesting quick weekend project to tinker with. thank you!

  • @mdg61313
    @mdg61313 2 ปีที่แล้ว

    how do I make the lines larger than 100 characters, I tried changing this line larger than 100 but that didn't make a difference.
    resize_image(image, new_width=1680): any thoughts on how to make this bigger ?

  • @em_iiy
    @em_iiy 4 ปีที่แล้ว +6

    Really cool video!
    Would it be possible for you add a simple animation to visually explain what you are doing. Since i often find myself replaying parts of the video to get an idea what the code you wrote does.
    Anyway, I recently found your channel, and i'm really enjoying your videos.

  • @0xchef978
    @0xchef978 2 ปีที่แล้ว +3

    Hey could you help? I'm having trouble with the import PIL.Image. I've tried looking everywhere and see no info about how to get it to work

  • @salmalichattopadhyay4034
    @salmalichattopadhyay4034 2 ปีที่แล้ว +1

    Ok, so I followed everything and I also had to install PILLOW module because PIL.Image is not an pre-installed package. And I also run the program and it runs smoothly but when showing the output it basically does nothing but show some dots, it looks nothing like the image I entered. I dont know why this is happening. Is it because I am using IDLE interpreter? If anyone knows why this is happening do let me know

  • @ghostmonster6044
    @ghostmonster6044 3 ปีที่แล้ว

    Can you help me solve one error about : import "PIL.Image" could not be resolved from source Pylance(reportMissingModuleSource) [1,8]

  • @ot8983
    @ot8983 5 หลายเดือนก่อน +4

    Great tutorial. But you often just type and run over what you type quickly with absolutely no explanation as to what it is, so I'm left feeling like I just copied a code manually rather than learned something new.

  • @karmitfrog7968
    @karmitfrog7968 8 หลายเดือนก่อน

    can i initialize utf32 / unicode too . if it is what should write

  • @younsrl1493
    @younsrl1493 2 ปีที่แล้ว

    How do u know that u need to do a floor division by 25?

  • @cjprocker
    @cjprocker 3 ปีที่แล้ว +4

    does this work in IDLE python?

  • @jeff4ever2
    @jeff4ever2 3 ปีที่แล้ว +2

    UnboundLocalError: local variable 'image' referenced before assignment
    someone can help me??

  • @thereedededge
    @thereedededge 2 ปีที่แล้ว +1

    im getting a few errors saying it has no attribute convert or getdata

  • @dushyantrangarajan3036
    @dushyantrangarajan3036 3 ปีที่แล้ว

    actually i hav an issue
    the resize function is not working quite right..my ascii is as tall as a giraf

  • @rishikeshsheth104
    @rishikeshsheth104 2 ปีที่แล้ว

    I keep getting a ModuleNotFoundError for PIL. What shoudl I do?

  • @DoubleFL3X
    @DoubleFL3X 3 ปีที่แล้ว +21

    is not a valid pathname to an image. (Solved)
    In the first line change
    import PIL
    to
    from PIL import Image
    and in line 29 remove this
    PIL.

    • @niterider3622
      @niterider3622 3 ปีที่แล้ว +1

      Dude it still doesn’t work, I’m not sure what I’m doing wrong

    • @DoubleFL3X
      @DoubleFL3X 3 ปีที่แล้ว +1

      @@niterider3622 the image and the code should be in same folder

    • @quahmingjun7246
      @quahmingjun7246 3 ปีที่แล้ว

      @@DoubleFL3X there isn't a need tho lmao

    • @dennistac5549
      @dennistac5549 3 ปีที่แล้ว

      winner here!!

    • @asdqwe7179
      @asdqwe7179 3 ปีที่แล้ว

      Thanks

  • @goblockgames4524
    @goblockgames4524 3 ปีที่แล้ว +2

    Thanks brother! this really helps me!

  • @abdullahabd7677
    @abdullahabd7677 3 ปีที่แล้ว +4

    The main function is kinda sketchy.
    Three level function argument passing doesn’t look that good. Anyone have that PEP reference for this?
    Thaf list comprehension compromises readability.

  • @humaysdova9560
    @humaysdova9560 2 ปีที่แล้ว +2

    Great tutorial! Thank you

  • @pranavendudas6126
    @pranavendudas6126 2 ปีที่แล้ว

    Can we Try it Out in Android Devices in Pydroid3?

  • @tohereknowswhen779
    @tohereknowswhen779 2 ปีที่แล้ว

    [Errno2] No such file or directory, it says when i command py script py

  • @AnasDharar
    @AnasDharar 2 ปีที่แล้ว

    I can't find where my txt file is saved. Please help

  • @konstantineendeladze9029
    @konstantineendeladze9029 ปีที่แล้ว

    Can anyone explain why do we devide pixels over 25?

  • @hichembenberna4745
    @hichembenberna4745 3 ปีที่แล้ว

    Please tell me how can i get a pathname

  • @jonathandias3403
    @jonathandias3403 3 ปีที่แล้ว

    def main(): not working. Just says its invalid syntax

  • @GamaPerkasa
    @GamaPerkasa 3 ปีที่แล้ว

    it was great, super cool library. thxs

  • @shouryadeepbera7114
    @shouryadeepbera7114 3 ปีที่แล้ว +13

    can you please upload it in github?

  • @anemone5264
    @anemone5264 ปีที่แล้ว

    Thank you Kite!

  • @joedew4183
    @joedew4183 3 ปีที่แล้ว

    how do i get PIL

  • @obit0330
    @obit0330 4 ปีที่แล้ว +2

    more py tutorial, already subs

  • @seamuskills
    @seamuskills 3 ปีที่แล้ว +18

    you went a little too fast but after making youtube play it at 0.75 speed this tutorial was amazing, thanks

  • @martinbergstrom7555
    @martinbergstrom7555 4 ปีที่แล้ว +1

    Cool stuff!

  • @asifiqbal5713
    @asifiqbal5713 2 ปีที่แล้ว +1

    PIL not working... Can anyone help?

  • @stephencurry3502
    @stephencurry3502 3 ปีที่แล้ว

    by the time i wrote 'import PIL.Image', you already completed the try block! Please try to type a bit slower

  • @tqracing
    @tqracing 4 ปีที่แล้ว +7

    For the aspect ratio to work you need to account for the character dimensions.

  • @josephololade
    @josephololade 4 ปีที่แล้ว +24

    Was thinking about this few weeks ago wondering how it's been done

    • @thebry4n547
      @thebry4n547 3 ปีที่แล้ว +1

      Likewise bro, but animated

    • @davisionairy4680
      @davisionairy4680 3 ปีที่แล้ว

      When I try to copy n paste a image it doesnt work

  • @walterpaizinho
    @walterpaizinho 2 ปีที่แล้ว +1

    good job!
    Hey man, how would I do a python request for a url and pull an image of a chemical structure in the terminal? is it possible?
    thanks

    • @danielhildebrand7684
      @danielhildebrand7684 2 ปีที่แล้ว

      Idk if you're on linux, but I use wget and "url" in the terminal.

  • @l.lawliet4584
    @l.lawliet4584 3 ปีที่แล้ว

    can someone give me the python file plz

  • @carlosalmasque8060
    @carlosalmasque8060 3 ปีที่แล้ว +4

    I have an error that says "Unable to import 'PIL.Image' " and there was an unused variable 'image' what did I do wrong to correct it?

    • @MygenteTV
      @MygenteTV 3 ปีที่แล้ว

      try running it using python3.9 or just install the module

  • @Raw-addict33
    @Raw-addict33 2 ปีที่แล้ว

    What if, at the end, I want to export to Jpg or Jpeg instead of .txt? thanks !!

    • @Joe-rx2lq
      @Joe-rx2lq 2 ปีที่แล้ว +1

      ascii is an format of characters that you type in, like these ones i am so there is no way u can do .jpg or .jpeg

  • @maxziebell4013
    @maxziebell4013 4 ปีที่แล้ว +1

    Awesome!

  • @SaritaKumari-oe5dc
    @SaritaKumari-oe5dc 3 ปีที่แล้ว +1

    Plz help me I have a error saying "local variable 'image' referenced before assignment

    • @sphires
      @sphires 3 ปีที่แล้ว

      image is created in the try statement, check the output to see if the exception is printing

  • @svinosuke
    @svinosuke 2 ปีที่แล้ว +1

    Hey my image paths dont seem to be working for some reason any fixes?

    • @pelak77
      @pelak77 ปีที่แล้ว

      Replace with this line :

  • @paulboss5524
    @paulboss5524 3 ปีที่แล้ว

    у меня что то не работает я не могу ему скормить картинку которую хочу преобразовать в ascii

  • @user-ih4kr9gc4b
    @user-ih4kr9gc4b 3 ปีที่แล้ว +3

    Thank you

  • @Spenpai
    @Spenpai 3 ปีที่แล้ว +2

    I managed to get work with image sets, as an animation of ASCII characters.
    I added a few more input variables like number of images and image type, and added a frame delay so that it would print to the console with distinct frames instead of being to fast for the human eye.
    The animation frames will just go on loop, because I though it would be underwhelming if it just showed the animation one time.

  • @jiriheistein4372
    @jiriheistein4372 3 ปีที่แล้ว +1

    I wasn't able to install Kite. My CPU is not supported. Do I have any other option please?

  • @manavgandhi1891
    @manavgandhi1891 3 ปีที่แล้ว +2

    it shows this ModuleNotFoundError: No module named PIL.image, though i have pillow installed in my system.

  • @arkadiishenberg948
    @arkadiishenberg948 2 ปีที่แล้ว +1

    Nice guide!
    But what does 'pixel//25' stand for? When join method iterates through 'pixels' which type does 'pixel' get?
    Thx a lot.

    • @gecicihesap901
      @gecicihesap901 2 ปีที่แล้ว +2

      // is the operation for floor divison. This guarantees that we get an integer as the result. So "pixel//25" divides the intensity of the pixel by 25 and rounds it to the smaller integer. The important thing to notice is that he is using the result of "pixel//25" (e.g. let's say 3) to choose an element from the list of ASCII charachters he made earlier (so in our example, it would choose the 4th element, which is "%"). This is also why ASCII charachters were listed in descending intensity at the start.

    • @vojtechsokala3611
      @vojtechsokala3611 ปีที่แล้ว +2

      @@gecicihesap901 Thanks for explaining when i changed ammount of ASCI chars i got error.

    • @gecicihesap901
      @gecicihesap901 ปีที่แล้ว +1

      @@vojtechsokala3611 No problem, mate!

  • @GuadelupeCooks
    @GuadelupeCooks ปีที่แล้ว

    I would like to ask How can I add a comment that can be printed along with the image or after the image? Also, can I compile this Python code into a exe file?

    • @GuadelupeCooks
      @GuadelupeCooks ปีที่แล้ว

      I added the print() statement. Can this code be compiled with pyinstaller?

  • @thingthing978
    @thingthing978 2 ปีที่แล้ว +3

    Hi, I keep on getting the error "not a valid pathname to an image"
    as well as "UnboundLocalError: local variable 'image' referenced before assignment
    Any help please?

    • @elciocarlos3636
      @elciocarlos3636 2 ปีที่แล้ว

      insira a linha:
      from the PIL import image
      insert the line:
      from the PIL import image

    • @pelak77
      @pelak77 ปีที่แล้ว

      Replace with this line :

  • @redjells5530
    @redjells5530 2 ปีที่แล้ว

    I have an error! it says ' ModuleNotFoundError: No module named ' PIL ' ' - if someone can help me, that would be great. thanks

    • @lolita001
      @lolita001 2 ปีที่แล้ว

      sudo pip install Pillow

  • @sapy4124
    @sapy4124 2 ปีที่แล้ว

    My program is not even opening.....why?

  • @gabri3ltz
    @gabri3ltz 2 ปีที่แล้ว +8

    I get the following result:
    "new_image_data = pixels_to_ascii(grayfy(resize_image(image)))
    UnboundLocalError: local variable 'image' referenced before assignment"

  • @LuckyLootCrate
    @LuckyLootCrate 4 ปีที่แล้ว +1

    Tysm :D

  • @danielhildebrand7684
    @danielhildebrand7684 2 ปีที่แล้ว

    Very good!

  • @pixepo
    @pixepo ปีที่แล้ว +1

    it keeps saying invalid path for image even though the image is in same folder , I also give it full path.. help?

    • @connorsingh1553
      @connorsingh1553 ปีที่แล้ว

      Same here - have you found a solution?

  • @syahrilhidayat6039
    @syahrilhidayat6039 2 ปีที่แล้ว

    I save the project and images in a folder, but when I want to open the image there is a message ril.jpg is not a valid pathname to an image. can you help me?

  • @kfo-noah5690
    @kfo-noah5690 3 ปีที่แล้ว +2

    I did cd desktop but it said that the system can’t find the given path

  • @anthonyrandazzo4719
    @anthonyrandazzo4719 6 หลายเดือนก่อน

    Hey sorry for the ignorance, but when i run the script it tells me no module named 'PIL'. This is my first time in Python so my bad haha.

    • @ot8983
      @ot8983 5 หลายเดือนก่อน

      same here. did not find a solution

  • @nataliasouza9208
    @nataliasouza9208 3 ปีที่แล้ว +1

    How i made this into a .exe with a graphic interface? Anyone knows what i need to use to do? And i will ger with python language? - i tried to think in make a site and attempt to convert to exe but idk if work

    • @MygenteTV
      @MygenteTV 3 ปีที่แล้ว

      use kivy for that

    • @aradhaymathur
      @aradhaymathur 3 ปีที่แล้ว

      Use tkinter and pyinstaller
      Pyinstaller need to be installed first.
      After that convert the program using pyinstaller

  • @Brandon-gy6rt
    @Brandon-gy6rt 3 ปีที่แล้ว +8

    im getting invalid path names, even though I copy the absolute pathname/ path from content root into the command prompt

    • @SalvettiRocco
      @SalvettiRocco 3 ปีที่แล้ว

      same

    • @gabrielesolms7048
      @gabrielesolms7048 3 ปีที่แล้ว

      what do you mean, how do i fix this

    • @maxinator1830
      @maxinator1830 3 ปีที่แล้ว +1

      @@SalvettiRocco You need to write "from PIL import Image"

    • @maxinator1830
      @maxinator1830 3 ปีที่แล้ว

      @@quahmingjun7246 You need to write "from PIL import Image"

    • @maxinator1830
      @maxinator1830 3 ปีที่แล้ว +1

      @@gabrielesolms7048 You need to write "from PIL import Image"

  • @kn-uh1zh
    @kn-uh1zh 3 ปีที่แล้ว

    when i try to run code it says ModuleNotFoundError: No module named 'PIL'
    referring to the import PIL image how do i get this to work

    • @jonathanf680
      @jonathanf680 3 ปีที่แล้ว +2

      In the command line write:
      cd [here the path to the folder where your python file is]
      And then:
      pip install PIL

    • @xavierang3186
      @xavierang3186 3 ปีที่แล้ว

      @@jonathanf680 where is the command line

    • @quahmingjun7246
      @quahmingjun7246 3 ปีที่แล้ว

      @@xavierang3186 powershell or CMD

  • @BluGlaxian
    @BluGlaxian 3 ปีที่แล้ว

    am i just slow or something i have him at 0.25 speed and i still cant follow hes so fast

  • @largo9711
    @largo9711 2 ปีที่แล้ว +1

    Line 37??

  • @comicatomics
    @comicatomics 2 ปีที่แล้ว +1

    All it does is that it keeps saying "'import' is not recognized as an internal or external command,
    operable program or batch file."
    I've followed everything else in the tutorial, but I'm really frustrated with the end result being nothing

    • @basiladeeb
      @basiladeeb 2 ปีที่แล้ว

      In case you are still lost, you need to install a Python interpreter. There are many interpreters for Python, and I personally use the IDLE interpreter.

    • @Quoneel
      @Quoneel 2 ปีที่แล้ว

      This sounds like you haven't properly set up python.

  • @echoptic775
    @echoptic775 3 ปีที่แล้ว +1

    Ascii to image when?

  • @samu-yx8zv
    @samu-yx8zv 2 ปีที่แล้ว +1

    3:14 can someone please explain the [ASCII_chars[pixel//25]] part please?

    • @gecicihesap901
      @gecicihesap901 ปีที่แล้ว +1

      I am 5 months late, but here it is (copy of my previous comment):
      // is the operation for floor divison. This guarantees that we get an integer as the result. So "pixel//25" divides the intensity of the pixel by 25 and rounds it to the smallest integer. The important thing to notice is that he is using the result of "pixel//25" (e.g. let's say 3) to choose an element from the list of ASCII charachters he made earlier (so in our example, it would choose the 4th element, which is "%"). This is also why ASCII charachters were listed in descending intensity at the start.

    • @konstantineendeladze9029
      @konstantineendeladze9029 ปีที่แล้ว +1

      @@gecicihesap901 wow thanks so much. You helped me a lot

    • @gecicihesap901
      @gecicihesap901 ปีที่แล้ว +1

      @@konstantineendeladze9029 No problem, mate! I am studying computer science, always a pleasure to help others who want to learn it.

  • @sajiodude973
    @sajiodude973 4 ปีที่แล้ว +1

    bro can you please help me I am getting an issue:
    "C:\Users\MY BOOK\Documents\thumb-1920-606500.jpg is not a valid pathname to an image."
    bro I am stuck here please help me with a valuable info.
    your projects are really cool I am liking it quite a lot.

    • @DoubleFL3X
      @DoubleFL3X 3 ปีที่แล้ว +1

      In the first line change
      import PIL
      to
      from PIL import Image
      and in line 29 remove this
      PIL.

    • @freddaniel1
      @freddaniel1 3 ปีที่แล้ว +1

      @@DoubleFL3X Thaaaanks!!! This fixed the error

    • @C_SrajanAcharya
      @C_SrajanAcharya 2 ปีที่แล้ว

      @@DoubleFL3X not fixing tho

  • @humptydumpty6323
    @humptydumpty6323 3 ปีที่แล้ว +2

    I have a problem showing in sublime. It is showing :-
    AttributeError: 'NoneType' object has no attribute 'convert'. I am using ubuntu

  • @_grayven1202
    @_grayven1202 ปีที่แล้ว

    Can I just copy paste all this please? I'm not interested in coding and typing all this myself seems pointless

    • @elmetiu
      @elmetiu ปีที่แล้ว

      write from PIL import Image instead of import PIL

  • @hudadamar21
    @hudadamar21 3 ปีที่แล้ว

    how to save as image instead txt ??

  • @mr.zero-zone
    @mr.zero-zone 2 ปีที่แล้ว

    can anyone help me to solve "image pathname is invalid"

    • @connorsingh1553
      @connorsingh1553 ปีที่แล้ว

      I get the same error! have you found any fixes? I'm on mac BTW

  • @vanmanhtran4813
    @vanmanhtran4813 3 ปีที่แล้ว +1

    how to print it with color?

  • @Spiceysec
    @Spiceysec 3 ปีที่แล้ว

    no module named PIL

  • @rishabhsharma6084
    @rishabhsharma6084 4 ปีที่แล้ว +2

    youtube sent me notification today(5days later)😒😒 wtf TH-cam

  • @tomay3000
    @tomay3000 ปีที่แล้ว

    does kite support Notepad++?

    • @ot8983
      @ot8983 5 หลายเดือนก่อน

      kite has been discontinued

  • @krmklx_
    @krmklx_ 2 ปีที่แล้ว

    is not a valid pathname to an image It says this

  • @yovisstar
    @yovisstar 3 ปีที่แล้ว +2

    Nice tutorial. But i have a question, why does the ascii pixel is divided by 25?

    • @ankitchaurasia8016
      @ankitchaurasia8016 3 ปีที่แล้ว

      Found answer?

    • @dancetothemusic99
      @dancetothemusic99 3 ปีที่แล้ว

      Grayscale values are 0 - 255. You want to map that to 10 characters.

    • @abhaynambiar271
      @abhaynambiar271 2 ปีที่แล้ว

      @@dancetothemusic99 isn't it 11 chars?

    • @dancetothemusic99
      @dancetothemusic99 2 ปีที่แล้ว

      @@abhaynambiar271 Ah yes, 11 characters. Flat dividing any 0 to 255 by 10 will give you 11 results INCLUDING zero.

    • @abhaynambiar271
      @abhaynambiar271 2 ปีที่แล้ว

      @@dancetothemusic99 ahhh that makes sense thanks

  • @avoidevader4038
    @avoidevader4038 2 ปีที่แล้ว

    'function' object has no attribute 'convert' nooo

  • @SaritaKumari-oe5dc
    @SaritaKumari-oe5dc 3 ปีที่แล้ว

    Is PIL.image inbuilt?

  • @toremolin9709
    @toremolin9709 4 ปีที่แล้ว +8

    it just says that it's not a valid pathname to an image even though i use .jpg

    • @samkerr2010
      @samkerr2010 3 ปีที่แล้ว

      Did you find a fix?

    • @aswinjose9475
      @aswinjose9475 3 ปีที่แล้ว +1

      Try putting the image in the same folder as the code.

    • @khwaishtongia1687
      @khwaishtongia1687 3 ปีที่แล้ว +1

      try from PIL import Image.

    • @0xtanishq
      @0xtanishq 3 ปีที่แล้ว

      @@khwaishtongia1687 i tried every fix, but didn't worked!

    • @hashstation74
      @hashstation74 3 ปีที่แล้ว

      same problem here

  • @bigmancozmo
    @bigmancozmo 3 ปีที่แล้ว +5

    **sees doge on thumbnail**
    me be like: I. MUST. CLICK. THE. MYTHICAL. DOGE

  • @wyttee
    @wyttee 4 ปีที่แล้ว +1

    That was awesome ...👏👏👏👏

    • @KiteHQ
      @KiteHQ  4 ปีที่แล้ว

      🙌 thank you!

  • @mapstardust9761
    @mapstardust9761 2 ปีที่แล้ว

    Line 27: path = input("Enter a valid pathname to an image:
    ")
    ^
    IndentationError: expected an indented block remove this 27?

    • @csicee
      @csicee 2 ปีที่แล้ว

      indent it

  • @fgomez
    @fgomez 4 ปีที่แล้ว +3

    What a great tutorial. Please share the Github link

    • @KiteHQ
      @KiteHQ  4 ปีที่แล้ว +3

      Thanks for the reminder! We've added our repo link in the description. Here's the link for this project: github.com/kiteco/python-youtube-code/tree/master/ascii

  • @pimysoft2896
    @pimysoft2896 3 ปีที่แล้ว +1

    Wait, i don't understand that //25

  • @tomcorlay7380
    @tomcorlay7380 3 ปีที่แล้ว +1

    Dont work for me

  • @ngonidzashemwanjira208
    @ngonidzashemwanjira208 2 ปีที่แล้ว

    I am using PyCharm and boy do I keep finding more errors

  • @usertechgamer2310
    @usertechgamer2310 4 ปีที่แล้ว +1

    Hello bro, it says that "is not a valid pathname to an image." when I try to put. "picture.jpg" (this is the real name of picture)

    • @0xtanishq
      @0xtanishq 3 ปีที่แล้ว

      @Chiba Liba I tried that but didn't worked!

    • @muhammadkhafidprayoga2608
      @muhammadkhafidprayoga2608 3 ปีที่แล้ว

      same, i use ubuntu 20.04

    • @DoubleFL3X
      @DoubleFL3X 3 ปีที่แล้ว +3

      In the first line change
      import PIL
      to
      from PIL import Image
      and in line 29 remove this
      PIL.

    • @muhammadzubair7419
      @muhammadzubair7419 3 ปีที่แล้ว +1

      @@DoubleFL3X thanks bro its working

    • @sagarnewpane8549
      @sagarnewpane8549 3 ปีที่แล้ว

      @@DoubleFL3X Thanks man it worked!

  • @rodricbr
    @rodricbr 3 ปีที่แล้ว +12

    I'd recommend to slow down the tutorial, because this guy is a speech machine

    • @tr4976
      @tr4976 3 ปีที่แล้ว

      i agree... i'm a beginner, and... i am so lost, how do people talk so fast :(

  • @mr.bazuka9756
    @mr.bazuka9756 2 ปีที่แล้ว

    Why I get this error?``` list index out of range```

    • @gecicihesap901
      @gecicihesap901 2 ปีที่แล้ว

      Your ASCII character list doesn't have enough elements
      OR
      You forgot to do floor division

    • @mr.bazuka9756
      @mr.bazuka9756 2 ปีที่แล้ว

      Thanks for replying but i figured out that my list had 1 element short 😅

  • @gmodandhl2experiments849
    @gmodandhl2experiments849 2 ปีที่แล้ว

    i used the one on your git repo, gave it an image and it wont work

    • @elmetiu
      @elmetiu ปีที่แล้ว

      same :(

    • @elmetiu
      @elmetiu ปีที่แล้ว

      solved it write from PIL import Image instead of import PIL, then solve the warning that should appear

  • @philtoa334
    @philtoa334 3 ปีที่แล้ว

    Nice

  • @DaDevKing
    @DaDevKing 2 ปีที่แล้ว +1

    It says PIL.image module does not exist

    • @cheems24
      @cheems24 2 ปีที่แล้ว

      you figure out how to install PIL?

    • @DaDevKing
      @DaDevKing 2 ปีที่แล้ว

      @@cheems24 nope

  • @noobindianguy1875
    @noobindianguy1875 2 ปีที่แล้ว

    my brain cells explode after watching this