I just love the super detailed explanations accompanied by writing the code. Really amazing work here Corey and I hope you'll make more videos about Python libraries and common misunderstanding developers have. Big thank you!
Awesome Video. Just a little rectification. The "L" mode that you used for converting your image into black and white, is actually for converting an image into greyscale. A black and white image only consists of 2 colors (Black & White) and the image that you converted had several shades of grey(0-255). For Converting an image into black and white you have to use "1" mode which stands for 1 bit per pixel which truly resembles a Black & White image, use that in disabled dither mode to actually see the black and white image otherwise you will see you image with grainy noise. You can sort of see this just by looking at the image, a black and white image should just contain black and white not any other color.
My mindvoice : What in Python does Corey Schafer doesn't know? Best Python instructor on UA-cam. Hope you can start some Udemy courses, Corey. People will be flocking towards your course.
So this is what I do, I open one of Corey’s tutorials, hit like, then watch the video, thank you Corey for the great content you are providing, much appreciated
I like it. Going to have to learn more about the OS feature and how to loop through files and such without destroying my own directories lol but this looks like exactly what I will use when I have a better understanding of how that part works. Thank you
Dear Corey Schafer, Thanks a lot for all of your Python tutorials. I am basically from science background, however, i am able to do python code in data analytics field. You are just amazing in teaching those. Then, I request you to make one video about HyperSpy and spectral python package's application.
How are you running your command? Each time you do it you click off-screen and bang, the program works! I have to terminal each and every time. It seems like you're using Sublime Text, or something formateed very similar. Very interseted in this answer and in watching more of your videos because...this one was the best programming video I've ever seen yet.
Hey there. I'm not clicking off screen, I'm just pressing Cmd+b. That is how you run code within Sublime Text. There are several other ways we could execute it via the terminal, but this is how I usually do it in my videos. Thanks for the question.
I'm using pycharm. It similarly uses Cmd+r to execute code. If you have to use terminal every time, you can maybe try out pycharm. There are two free versions: community (PC), and Education (PE).
Corey, I wish you could talk about byte datatype and its usage at low level stuff(like windows/unix files). I think, your intro stuf with this series will avoid me reading "dive into python" book
Corey not only knows how to make python tutorials fun to watch, he also singles out all the best tools a python programmer ever needs. I'm proud to live in an era in which I can watch guys like him. Good job bro. ☫
This is one of the best tutorials i came across and explanations are also very clear! I have a small problem though cuz when i tried to do the reverse, that is, convert png to jpg it wasn't working and was showing error. how to i solve that?
Hi, Can you do a video on using piexif library for images to geotag gps data to the images through python programming. Would really appreciate that. Your videos are clear and easy to understand.
I know it's out of scope for this video, but if someone were using windows and duplicated your steps exactly, the "/" wouldn't be correct. Since you've already imported os, you can use os.path.join() as a platform agnostic way of building the path to the files.
At around the 6:25 point in the video I get """ fname, fext = os.path.splittext(f) AttributeError: module 'ntpath' has no attribute 'splittext' """ In the shell window. Any ideas on what I have missed?
Hi! What code shall I use, in Python when I have to check automatically like 400 high resolution photos(RGB,thermal,and daylight)? The program shall detect sub-milimmiter anomalies(like small cracks) inside of each photo,if any,if not should scan the next one,etc.Exemple of inspection:wind turbines,flare stacks,etc. Thanks in advance, Costel
+FLORIN RACOVEANU I guess you're gonna have to figure that out, isn't that what programming is supposed to be? pypi.python.org/pypi/PIL this might be a good way to start. Happy coding!
Another great video, thank you for making this and sharing it with all of us! Following along this video and referencing another video that you made, would it be advisable to make a context method for doing image manipulation? One of your previous videos uses something you call a context method for opening and closing files, but in that video you mention a context method could be created for various other tasks, I am wondering if this image manipulation would be applicable?
Thanks a lot for the detailed tutorial. I am wondering if you can do one on the Python 3 version as it is quite different than the one you showed here. Still regardless thanks a lot! It really helps as a start. Also I am using a windows platform, do I still need that os.listdir code? Thanks!
Great video. Is there a way to tell python to go to a webserver, login and enter the folder to change the files there or does this only work locally? Thanks
I'm sure there are ways you can do that. Is this a webserver you have access to? If so, it may be worthwhile to install python on that server and maybe run a cron task to do what you want on a regular basis. I'm not sure of your usecase exactly, but we do things like that at my work a lot. Hope that helps. Thanks.
I looked up online but I couldn't find it. The method PIL.Image.getpixel(x, y) is 0-based or 1-based? I mean, do the coordinates start from 0 or do they start from 1? Thank you in advance.
do you know a way to create a new folder within the code as well? I want to create a template script I can use and generate a directory of folders in the process of creating the image variations. Another question is can you put a black or white background on a jpg being created from a transparent png?
Great video but I have question. I looked around a lot to figure out a way to convert a 'jp2' image to something else. Apparently 'PIL' library does not support this format. I also tried the 'matplotlib' and that one did not work as well. do you have any recommendation to how convert a 'jp2' format to a 'mpeg' or 'Jpeg' using python? I really appreciate the help.
from PIL import Image im = Image.open("photo.jpg") => not works on raspberry pi, Do you have any idea how to solve this? xli seems possible but the quality is terrible.. Thx!
Great video.. as usual! I'm concerned about the following note found on the Pillow website: "Pillow and PIL cannot co-exist in the same environment. Before installing Pillow, please uninstall PIL." Is PIL pre-installed on the default Python installation? If yes, how do we do that? Thanks
How can I use PIL to create multiple PNG images as combinations of PNG images from a holder. You can imagine it as simple as a random avatar generator ( Face+Hat+Clothing+Shades)
I think you make the best python tutorials on UA-cam.
umepata ufunuo, i think you should make a class on python for android apps
I think so. better than most I've watched
@@emmanuelmtera5936 Lakini amepata ile ufunuo kutoka wapi?
@@veitkoch3784 well i dont know, but he teaches well
@@emmanuelmtera5936 Na kweli, anaeleza safi kabisa. Ana sauti nzuri pia.
4 years later and it's still relevant. Thanks alot!
8 years*
I just love the super detailed explanations accompanied by writing the code. Really amazing work here Corey and I hope you'll make more videos about Python libraries and common misunderstanding developers have. Big thank you!
Came for Python stayed for the puppy
I was scrolling to the comments about to type the same exact sentence
Awesome Video. Just a little rectification. The "L" mode that you used for converting your image into black and white, is actually for converting an image into greyscale. A black and white image only consists of 2 colors (Black & White) and the image that you converted had several shades of grey(0-255).
For Converting an image into black and white you have to use "1" mode which stands for 1 bit per pixel which truly resembles a Black & White image, use that in disabled dither mode to actually see the black and white image otherwise you will see you image with grainy noise.
You can sort of see this just by looking at the image, a black and white image should just contain black and white not any other color.
My mindvoice : What in Python does Corey Schafer doesn't know?
Best Python instructor on UA-cam.
Hope you can start some Udemy courses, Corey. People will be flocking towards your course.
I would like to thank you from the bottom of my heart for this tutorial
So this is what I do, I open one of Corey’s tutorials, hit like, then watch the video, thank you Corey for the great content you are providing, much appreciated
Excellent. Your pacing is terrific - direct and to the point.
Searched 'Pillow Module' tutorial, Got favorite youtuber's channel. Thanks a lot.
thanks God, I found your channel. Actually, I'm a beginner in python. Your explanation is simple and understandable. Thank you
6 years also
Best python tutorial on UA-cam. You are simply amazing 😀
You will be a legend in Python history.
Fantastic. Crisp. Clear. Precise. Thank you!!
Simple and straight to the point. Thanks.
when I want to find some good knowledge about some python topic , the first thing i do is to find if Corey has it in his channel . so good
Cory, i love your videos. it help me a lot with my projects. in a few months i learned python.
You are the best instructor! Thanks for your valuable videos.
you have the blood of a genius! thank you man!
Straight forward and well explained
Amazing video 👍👍
very informative video buddy highly appreciat your work
The best python teacher...
Oh - and packed with terrific information.
Very Very helpful videos man .... Keep them coming :)
Excellent tutorial! Thanks Corey!🙏
Thank you for the video..... This vid is entertaining and helpful at the same time......
All your videos are amazing, thank you for making content like this!
You are very good teacher by the way
A great video for me to get started with this library. Thanks!
Super helpful, thank you!
good sir. Your videos are a gift from god
Excellent tutorial! Thank you!
fantastic tutorial, thank you!
its incredible how python makes our lives so much easier lol
I like it. Going to have to learn more about the OS feature and how to loop through files and such without destroying my own directories lol but this looks like exactly what I will use when I have a better understanding of how that part works. Thank you
I have a video on the OS module as well if you'd like to learn more about that in-depth. You can search for it on my channel
@@coreyms Awesome Thanks a lot!
thanks for sharing this. really help me learn the basic idea of coding!
Dear Corey Schafer, Thanks a lot for all of your Python tutorials. I am basically from science background, however, i am able to do python code in data analytics field. You are just amazing in teaching those. Then, I request you to make one video about HyperSpy and spectral python package's application.
Thank you so much!!! Awesome tutorial and very much appreciated :)
Very very helpful, thank you very much !!!
You explained each and every thing very well
Good as always. Thanks.
Clear and precise!
thank you
Awesome, was looking for this. Thanks.
thanks brother, a lot
of information :)
Really simple. easy to understand. Thanks a lot!
great tutorial, and i've seen many. cheers!
this is an excellent tutorial!
Thanks for this concise demonstration.
How are you running your command? Each time you do it you click off-screen and bang, the program works! I have to terminal each and every time.
It seems like you're using Sublime Text, or something formateed very similar. Very interseted in this answer and in watching more of your videos because...this one was the best programming video I've ever seen yet.
Hey there. I'm not clicking off screen, I'm just pressing Cmd+b. That is how you run code within Sublime Text. There are several other ways we could execute it via the terminal, but this is how I usually do it in my videos. Thanks for the question.
I'm using pycharm. It similarly uses Cmd+r to execute code.
If you have to use terminal every time, you can maybe try out pycharm. There are two free versions: community (PC), and Education (PE).
Great video Corey! Could you do a video on shutil next? 😊
great! a great image editor!
Corey, I wish you could talk about byte datatype and its usage at low level stuff(like windows/unix files). I think, your intro stuf with this series will avoid me reading "dive into python" book
Corey not only knows how to make python tutorials fun to watch, he also singles out all the best tools a python programmer ever needs. I'm proud to live in an era in which I can watch guys like him. Good job bro. ☫
accurate.
warning this in 2021, in the midst of a pandemic. who would have thought!
thanks a lot , this is very helpful videos.
Thanks and you have a fine looking dog, and Im usually a cat fan
Thank you, sir!
great intro Thanks !
bro youve helped me so much. Cheers
Amazing video
8:23 you had a chance to make a joke about the spartans
THANK YOU A LOT!
Excellent tutorial, very clear. Thank you +
Nice video. Extra points for dogs. Subscribed and Bookmarked :)
Fantastic lib.
I used pip install and it's worked without any problem lol
I am very appreciative that you are doing a tutorial on this but I am pretty sure you can do this without using other libraries. I could be wrong .
Thanks a Lot, Bro.
I line for line have the exact same code and it will crop the image, but only along one axis. Original was 1024x768. New image is 300x200
This is one of the best tutorials i came across and explanations are also very clear!
I have a small problem though cuz when i tried to do the reverse, that is, convert png to jpg it wasn't working and was showing error. how to i solve that?
Great content. +1 Subscriber
Good video. Very handsome puppy.
when you added size_700, how did you change all three 300s at the same time?
I am wondering the same thing
Press alt while selecting
Thanks. very interesting video.
8:26 and this folder will hold all The 300 Spartans.
Hi,
Can you do a video on using piexif library for images to geotag gps data to the images through python programming. Would really appreciate that. Your videos are clear and easy to understand.
Hey, not sure if you get these, but I would love for you to breakdown how to read documentation
Thank you!
i keep getting a file not found error. i copy the direct path in my mac and the image still doesnt show up. help!
same..., did you find out how to do it?
I want to know how to open images which are in different directories
C// dell /users like that it didn't work for me
I know it's out of scope for this video, but if someone were using windows and duplicated your steps exactly, the "/" wouldn't be correct. Since you've already imported os, you can use os.path.join() as a platform agnostic way of building the path to the files.
very good video ! thx
At the end: It’s not need to close and reopen the image. Preview is able to update an opened image. ;-)
Nice tutorial, is there a way to highlight only certain words in pillow?
I guess it comes handy to make pics smaller. But rotation or color changing much better do with js on frontend part.
That may be true, but I would argue there are use cases for modifying images in this way outside the context of a website.
Hey Corey is it possible to create new images using PIL instead of just editing?
At around the 6:25 point in the video I get
"""
fname, fext = os.path.splittext(f)
AttributeError: module 'ntpath' has no attribute 'splittext'
"""
In the shell window. Any ideas on what I have missed?
2 t's in Splitext. oops
Do you know why an image would have missing pixels when using PIL? and how I could fix this? thanks!!
If i gave a size (width,height) in (20,20) the frame is occupying a gray color at the borders
Hi Corey, Any chance we would see some Open CV in the near future?
Hi!
What code shall I use, in Python when I have to check automatically like 400 high resolution photos(RGB,thermal,and daylight)?
The program shall detect sub-milimmiter anomalies(like small cracks) inside of each photo,if any,if not should scan the next one,etc.Exemple of inspection:wind turbines,flare stacks,etc.
Thanks in advance,
Costel
+FLORIN RACOVEANU I guess you're gonna have to figure that out, isn't that what programming is supposed to be? pypi.python.org/pypi/PIL this might be a good way to start. Happy coding!
Another great video, thank you for making this and sharing it with all of us! Following along this video and referencing another video that you made, would it be advisable to make a context method for doing image manipulation? One of your previous videos uses something you call a context method for opening and closing files, but in that video you mention a context method could be created for various other tasks, I am wondering if this image manipulation would be applicable?
Thanks a lot for the detailed tutorial. I am wondering if you can do one on the Python 3 version as it is quite different than the one you showed here. Still regardless thanks a lot! It really helps as a start. Also I am using a windows platform, do I still need that os.listdir code? Thanks!
Great video. Is there a way to tell python to go to a webserver, login and enter the folder to change the files there or does this only work locally? Thanks
I'm sure there are ways you can do that. Is this a webserver you have access to? If so, it may be worthwhile to install python on that server and maybe run a cron task to do what you want on a regular basis. I'm not sure of your usecase exactly, but we do things like that at my work a lot. Hope that helps. Thanks.
I looked up online but I couldn't find it. The method PIL.Image.getpixel(x, y) is 0-based or 1-based? I mean, do the coordinates start from 0 or do they start from 1? Thank you in advance.
0,0
do you know a way to create a new folder within the code as well? I want to create a template script I can use and generate a directory of folders in the process of creating the image variations. Another question is can you put a black or white background on a jpg being created from a transparent png?
awesome
Great video but I have question. I looked around a lot to figure out a way to convert a 'jp2' image to something else. Apparently 'PIL' library does not support this format. I also tried the 'matplotlib' and that one did not work as well. do you have any recommendation to how convert a 'jp2' format to a 'mpeg' or 'Jpeg' using python? I really appreciate the help.
from PIL import Image
im = Image.open("photo.jpg") => not works on raspberry pi,
Do you have any idea how to solve this? xli seems possible but the quality is terrible.. Thx!
Great video.. as usual!
I'm concerned about the following note found on the Pillow website:
"Pillow and PIL cannot co-exist in the same environment. Before installing Pillow, please uninstall PIL."
Is PIL pre-installed on the default Python installation? If yes, how do we do that?
Thanks
How can I use PIL to create multiple PNG images as combinations of PNG images from a holder. You can imagine it as simple as a random avatar generator ( Face+Hat+Clothing+Shades)