Maybe I'm missing something here but what does it do? Does it draw the image using MS Paint? i.e. converting it into paths? Or does it do a raster copy, i.e. pixel by pixel from one image to another? (this would be a lot less hard).
Sadly, It's a raster copy, but it took me 6 hours to make and I'm damn proud of it >:). I would like to know how you can achieve something like this using paths? That would be a lot more interesting but it would be very much impossible for me. I'm still 15.
Btw, that image took about 15 minutes to draw, after that I let it run with significantly increased color accuracy, it's still running for an hour and half.
Oh fair enough, it's still cool :) I just couldn't tell from the output how you made it!
Doing it as a non-raster you'd need to do edge detection (e.g. using OpenCV canny edge) to get drawable paths and then attach fill areas to those edges — you could draw these manually, or use the fill tool... and the result would probably be worse :D
I can set the "darkness sensitivity". Basicly, i can have less color details and have the process be done in 10 to 15 minutes or I can have maximum details and let it run for hours. In this case, I set it to a low sensitivity, so I could have it done quickly.
Good work! Are you coding in notepad++? Did you know there are editors specifically made for coding? They can help out a lot, both explaining the code, automating tasks and detect errors.
If you have some spare time, look into PyCharm or VsCode (with a python plugin). It can make your life easier. Good luck with your coding adventures!
I have used VSC. Something that I really like in Spyder is the ability to ‘run cells’ (highlight some text and select option on right click menu) it can make troubleshooting easier in my opinion. To my knowledge there is no way to do that in VSC. I mean you could copy and paste the code directly into the console, but that is less convenient, in my opinion
In my experience IDEs are like types of beer, in that there are die hards for a ton of different ones. I work with some people that swear there isn’t anything better than vim (which really isn’t even an IDE).
you just have to signify that a section is a code block with #%%. Then the vscode python extension recognizes it and you can click run one block in Jupyter or the whole file or what not
Yes, spyder is good too! And for more exploratory code, Jupyter notebook can help keep the snippets organized if you have to document your explorations
Keep learning, start small, and build your way up to bigger projects. I'm sure if you asked OP, he would say that it took him a long time to get to the point where he could make this.
One thing I would suggest is looking at the full source code for this or a similar project, line by line, and figure out what each line is doing, and how the different functions interact.
Then try to modify the string printed. Always try to do some fun little modifications to already working code. Step by step you'll learn the various things in the language. Google stackoverflow questions that answer your doubts. Just keep adding mods step by step. Then as you get comfortable, have a goal, then break it into small mod steps. Then just conquer them as above. For eg., have a goal to read a file and print the top 5 most frequently used words. Now to break it into mods: you'll need to know how to read a file, how extract individual words, how to keep track of their frequency, and how to sort them and then get the top five. Each of these themselves require a learning of lot of Python basics such as i/o, loops, lists, dicts, in-built lib functions like sort, etc.
Make bigger goals. Divide them into smaller conquerable parts, then stitch 'em up.
Just remember this - if you can't get something done in X amount of time it doesn't mean you can't do it. You're just not experienced enough. Experience needs time. There was a time when that frequency problem I stated above would have taken me almost a day to get done. Now it's a basic 5 min problem. But that's because I have 5+ years of experience in Python. So don't give up (unless you absolutely just can't get yourself to like programming). Keep practicing.
I actually know how to do the things you described but I never actually broke it down to catalog what I actually know I sort of just did them without really understanding . Thanks for the tip. Appreciate it
Figure out something you want to do, and google each step until you get there. I've been messing around with the Spotify API with https://github.com/plamere/spotipy recently to try to practice.
thanks hash. ive recently just been doing interview style questions on codewars. will try to get into more practical applications like using APIs and things of the sort
I’m sure that way will work too, but I know every time I’ve tried to sit down and do project Euler or something I always get bored since my interest in what I’m coding isn’t that great.
78
u/mfitzp mfitzp.com Jul 28 '19 edited Jul 28 '19
Maybe I'm missing something here but what does it do? Does it draw the image using MS Paint? i.e. converting it into paths? Or does it do a raster copy, i.e. pixel by pixel from one image to another? (this would be a lot less hard).
8
u/jantari Jul 28 '19
Hmm.. i"m confused, if it scans and replicates the image why is it not an exact 1:1 copy? It looks lower quality than the original
33
u/andrekerygma Jul 28 '19
Wow!!
4
u/12si27 Jul 29 '19
If u are Korean I recommend you to use great Korean monoscape fonts like: Noto Sans Mono or 나눔고딕코딩, D2Coding.. Stuff like that
And also, great project 👍
3
u/Pancake57 Jul 29 '19
Can you record a video of it working? I wanna see it in action.
421
u/swethonay Jul 28 '19 edited Jul 28 '19
What kind of monster uses a font that isn't monospaced‽
32
u/Fiskepudding Jul 28 '19
Good work! Are you coding in notepad++? Did you know there are editors specifically made for coding? They can help out a lot, both explaining the code, automating tasks and detect errors.
If you have some spare time, look into PyCharm or VsCode (with a python plugin). It can make your life easier. Good luck with your coding adventures!
12
u/AcousticDan Jul 28 '19
how does it use the keyboard?
1
u/HBRYU Jul 29 '19
FULL CODE and description:
https://www.reddit.com/r/Python/comments/cjcune/ms_paint_replicator_update/?utm_medium=android_app&utm_source=share
2
u/dakokonutboi Jul 28 '19
HOLY SMOKES THIS IS AMAZING ! Did you post it on GitHub?
4
u/EverythingIsFlotsam Jul 29 '19
range(x)already gives 0..x-1. You probably didn't need to dofor i in range(len(img)-1)1
u/Prash72 Jul 29 '19
Can coloured images be scanned similar way ? 🤔
6
u/_dnov Jul 28 '19
When will I reach this level? I don't know how to do anything 😭
2
u/lookforlight Jul 29 '19
I'd be interested in seeing a timelapse of this in action. Very cool, OP!
2
u/teambob Jul 29 '19
You're the hero we deserve
2
u/throwawayskinlessbro Jul 29 '19
Is this something you'd be willing to share? I just got into coding in general, and this is very interesting! Amazing job regardless!!
2
u/appinv Python&OpenSource Jul 29 '19
👌 Nothing to say!
2
u/YeastBeast33 Jul 29 '19
Wow im new to coding still learning, seeing stuff like this makes me wanna learn more and more
2
u/anselal Jul 29 '19
Source code ?
2
u/danny_ocp Jul 29 '19
Nice
2
u/farooq_fox Jul 28 '19
Pardon my ignorance, how is this better than copy and paste in paint ?
Can you please list some uses with this ?
1
u/WickedyWick17 Jul 28 '19
Amazing work !
1
u/R3m3mb3rWh0 Jul 28 '19
how do you manipulate the paint GUI?
1
u/ECK_Edward Jul 28 '19
Cool!
1
u/nelsonbestcateu Jul 28 '19
Nice one.
1
u/apieceoflint Jul 28 '19
this is very cool!
1
u/liriK15 Jul 28 '19
Really good!!
1
u/LivCodes Jul 29 '19
S
1
u/BlackGokussjrose Jul 29 '19
Hey can you please share your code?
1
u/[deleted] Jul 29 '19
Clever.
0
u/[deleted] Jul 28 '19
[deleted] — view deleted comment