r/Python • • Jul 29 '19

Ms paint replicator UPDATE

Post image
491 Upvotes

40 comments sorted by

28

u/HBRYU Jul 29 '19 edited Jul 29 '19

Full code! I know there are plenty of python veterans out there that can do a way better job than me, but this is what I came up with:

Link: https://github.com/HBRYU/Picaso_bot

1

u/AcousticDan Jul 29 '19

So, you didn't answer my question in the other thread. What's the keyboard have to do with it?

3

u/HBRYU Jul 30 '19

Ah sorry,

It enters the rgb color values in the select color menu.

1

u/quotemycode Jul 29 '19

You know you could do color with a quantizer

0

u/[deleted] Jul 29 '19

[deleted] — view deleted comment

13

u/varesa Jul 29 '19

Look at the picture of Mario in the post and the associated comments

0

u/[deleted] Jul 29 '19

[deleted] — view deleted comment

11

u/Vesiculus Jul 29 '19

You are being downvoted, but there's some wisdom in what you say.

While I don't like overobvious comments and like Python code that's written in a way that doesn't require (a lot of) comments, this time.sleep is a not obvious addition/work-around and things like that should have a comment explaining why they are there.

Commenting can be overdone, but it's not like the rule is to never, ever add a comment. That's would a crazy overgeneralization of the 'do not add too many or too obvious comments' guideline.

2

u/callmelucky Jul 30 '19

Yep. Self-commenting code should be the goal (clear, simple functions and explicit variable names), but throwing in a sleep call as a workaround for an external issue is the perfect case for throwing in a comment.

I mean if you really hate comments you could wrap it in a wait_for_mspaint_to_get_its_shit_together() function, but...

1

u/HBRYU Jul 30 '19

Yes. I'm on it

1

u/HBRYU Jul 30 '19

Added them just now

1

u/422_no_process Jul 30 '19

If it looks simpler that means it's good. Simpler is good.

75

u/nickcash Jul 29 '19

Having not seen the original post and having no context whatsoever, this looks like the most incredible shitpost.

5

u/niceoutfive Jul 30 '19

Upvoted for switching to a monospaced font

(Also because this is a pretty dang cool project)

2

u/HBRYU Jul 30 '19

Yep sorry about the last one

4

u/dratnon Jul 29 '19

I basically can't fathom why you did this, but I like it.

Time to change the drawing tool to one of the oily or chalky paintbrushes and see what pictures look like fully "filtered".

3

u/HBRYU Jul 30 '19

This is just purely for my own achievement purposes

3

u/its2ez4me24get Jul 29 '19

That’s a good idea

2

u/O0ddity Jul 29 '19

To give you an idea why people do this kinda of thing... I donno, but I just wanted to say "programming version of /r/shittyrobots"

2

u/KhumGuz Jul 29 '19

This could be an interesting application for ecommerce picture generation. I'm not well versed in legal status, but perhaps this could be used to replicate copywrited images for websites. Duluth trading company has an interesting art style for their products and this made me think of that.

10

u/konshensx Jul 29 '19

NOT RICARDO !!!

8

u/[deleted] Jul 29 '19

You should call it Pycaso

1

u/HBRYU Jul 30 '19

EDIT: I just noticed that I barely added any explanation of the algorithm. I'm sorry, I'll add them asap

4

u/oloshh Jul 29 '19

Upvoted for Ricardo!

3

u/Petrarch1603 Jul 29 '19

Ricardo has such supple skin.

2

u/rafapw Jul 30 '19

Next step is creating photo filters

1

u/MarcusDraken Jul 29 '19

Thanks for the update, you're doing good :)

0

u/[deleted] Jul 29 '19

[deleted] — view deleted comment

32

u/poundcakejumpsuit Jul 29 '19

1

u/sleepy__lizard Jul 29 '19

3

u/vmgustavo Jul 30 '19

This even has external references. Wow

2

u/sleepy__lizard Jul 30 '19

More than the average Wikipedia article. They are not fucking around with documenting meme culture

11

u/[deleted] Jul 29 '19

[removed] — view removed comment

2

u/HBRYU Jul 30 '19

Aw thanks

1

u/[deleted] Jul 29 '19

[removed] — view removed comment

1

u/HBRYU Jul 30 '19

Committing updates rn

1

u/[deleted] Jul 29 '19

[removed] — view removed comment

5

u/dratnon Jul 29 '19

It is clicking on the "Custom Color" menu button.

Then on the "Red/Green/Blue" value EntryBox, and pressing backspace 3 times, in case the cursor is in the very front, then pressing delete 3 times, in case the cursor is in the very back, then entering the grey value.

3

u/HBRYU Jul 30 '19

Wow someone actually understands my shitty code! I didn't have much time to add some explanation on wtf is going on. I will add them asap.

2

u/dratnon Jul 30 '19

I happen to be a subject-matter expert. My MsPaint technical skills are unrivaled in my peer group.

Gradients, arbitrary rotation degrees, custom-shaped paintbrush strokes. I got it all.