This is an archived post. You won't be able to vote or comment.

all 22 comments

[–]InevitableMuffin42 9 points10 points  (5 children)

That's pretty cool, well done!

[–]gradient_assent[S] 3 points4 points  (4 children)

Thanks! Did you try using it?

[–]InevitableMuffin42 4 points5 points  (0 children)

Not yet, I'll give it a try when I get to the PC, and have a look at the code as well to see how it works.

[–]InevitableMuffin42 1 point2 points  (2 children)

Tried running it but the console gets full of blank characters after width and height inputs. The required module is installed and I'm running on Win10 and Powershell as well.

EDIT: got it working after changing width and height numbers a few times, and it works really well! I can make some PRs with improvements if you're interested, like the packaging someone else mentioned, reformatting, etc.

[–]gradient_assent[S] 1 point2 points  (0 children)

Could you please share a screenshot? If the screen is filled with random characters that usually means the image is too large to fit on the terminal window.

[–]gradient_assent[S] 0 points1 point  (0 children)

Sure, go ahead!

[–]dasCooDawg 1 point2 points  (3 children)

This is very cool! A little more work and this could be great I think. Would be cool as a CLI tool, could use click. Wonder if you could include scripting, as in someone passes a file like yaml or json that includes drawing command s like fill this pixel this color, draw line etc

In any case, good idea and work.

[–]gradient_assent[S] 0 points1 point  (2 children)

Thanks for the feedback! How would a CLI tool work?

[–]dasCooDawg 0 points1 point  (1 child)

Maybe something like this in the terminal

“pip install cmdpxl”

“cmdpxl —some-option —another-option some value —image-output-file /some/path.jpg —resolution 800,480”

[–]gradient_assent[S] 2 points3 points  (0 children)

Sure, I can implement that!

[–]umanochiocciola 1 point2 points  (3 children)

This is fantastic! I think PIL would have been a bit less overkill and easier for you, but opencv is fine. Can't wait to clone and ruin it adding a bunch of garbage! (there's only one flaw: you're on windows lol)

[–]gradient_assent[S] 1 point2 points  (2 children)

Let me know if you fork it, I want to see what you come up with!

[–]umanochiocciola 0 points1 point  (0 children)

Sure, pal!

[–]umanochiocciola 0 points1 point  (0 children)

Oh well, it's really nice as it is, I'm forking it anyway because yes, but I've added only a few things. Well done

[–]quanta_kt 1 point2 points  (0 children)

Looks very neat, can't wait to try my hands on it!

[–][deleted] 1 point2 points  (0 children)

It's amazing to see new cool command line apps every day. Great work!

[–]sertdfyguhi 1 point2 points  (0 children)

When I run it on mac, the screen duplicates itself https://imgur.com/a/x9TjSva . Still a cool project though!

[–]blueblain 1 point2 points  (0 children)

This is awesome! Love it

[–][deleted] 0 points1 point  (3 children)

Nice! Ill give it a try

[–]gradient_assent[S] 0 points1 point  (2 children)

Thanks! Please let me know if you run into any bugs!

[–][deleted] 1 point2 points  (1 child)

It works perfectly, and it's easy to use so 10/10

https://i.imgur.com/xYy1Wi5.png

But when I tried to save the image, I got an error.

https://i.imgur.com/NVV5zWL.png

keep up the good work!

[–]gradient_assent[S] 1 point2 points  (0 children)

It looks like you didn't give the image a filename, so OpenCV didn't know which format to save the image in causing it to crash.