Pixel Art (Script)

Flesh out your ideas for new or improved Inkscape features before submitting a request.
dino1489
Posts: 3
Joined: Thu Apr 14, 2016 12:21 pm

Pixel Art (Script)

Postby dino1489 » Thu Apr 14, 2016 12:37 pm

Im not invested in scripting in inkscape so i cant really make this myself but I assume its an easy script to make since the tools are already built in. Basically the idea is to place squares on the canvas locking them into the grid after previously placing an already made sprite (image) into the grid. then, the script uses the dropper to get the color from the image to the squares. Alternatively if the language allows, it can just pick the color from the center of the grid square and place the square with that associated color.

Lazur
Posts: 4345
Joined: Tue Jun 14, 2016 10:38 am

Re: Pixel Art (Script)

Postby Lazur » Thu Apr 14, 2016 7:05 pm

Already possible with tiled clones.

dino1489
Posts: 3
Joined: Thu Apr 14, 2016 12:21 pm

Re: Pixel Art (Script)

Postby dino1489 » Fri Apr 15, 2016 11:16 am

When it comes to pixel art, it isn't crisp. I turned on grid snap and lined up the pixels; the results were never perfect translations.

I used auto hot key to automate part of it. if anyone is interested, you can change the parts of the code to the original inkscape keybindings. I've yet to see anyone use tiled clones to turn pixel art to vector perfectly yet. I know the script is kinda screen res reliant but its what im using atm and im only trying to put out there my work around if anyone needs it.

F1::
{

;Dropper Tool

send,{F2}
MouseMove, -2, -2, 10, R
Click down
MouseMove, 4, 4, 10, R
Click up
MouseMove, -2, -2, 10, R

;New Square

send,r
MouseMove, -20, -20, 10, R
Click downr
MouseMove, 40, 40, 10, R
Click up
MouseMove, -20, -20, 10, R
send,{shift down}
Click
send,{shift up}
}
return

Lazur
Posts: 4345
Joined: Tue Jun 14, 2016 10:38 am

Re: Pixel Art (Script)

Postby Lazur » Fri Apr 15, 2016 11:21 am

Have you seen this?

dino1489
Posts: 3
Joined: Thu Apr 14, 2016 12:21 pm

Re: Pixel Art (Script)

Postby dino1489 » Thu Apr 21, 2016 2:06 pm

no i didn't know about that and ty. it does work - takes a while tho; and, the processing laggs my computer, something bad. butm it definitely works. I was trying for a while now to automate that but i cant seem to do it, its not a main priority to me tho but if anyone is interested if u downside the pixil that will be tile cloned it doesnt work you have to upsize the bitmap. not sure why this is but hopefully automating this is a thing later cause it obviously works. I'd of try harder to script it but its not my strength, doing it by hand is just faster for smaller bitmaps. Im sure if I had a better computer the processing would be much faster. anyways ty again for the link.

Lazur
Posts: 4345
Joined: Tue Jun 14, 2016 10:38 am

Re: Pixel Art (Script)

Postby Lazur » Thu Apr 21, 2016 3:59 pm

You are welcome!

Yes it can be heavy, that is why tiled clones are limited to 500/500 rows/columns.

On the scripting, I have some doubts it could be done easily as
Inkscape verbs do not take arguments
.
(Meaning basically you cannot make a custom extension that uses parts of an existing/built in function?)

Like mentioned here.

blog4everyone
Posts: 1
Joined: Thu Jan 19, 2017 1:42 am

Re: Pixel Art (Script)

Postby blog4everyone » Thu Jan 19, 2017 1:45 am

Inkscape a really good software more than better as compared to photoshop


Return to “Inkscape Ideas”

Who is online

Users browsing this forum: No registered users and 1 guest