Kully / pixel-paint

An art tool for making 32x32 Sprites
https://kully.github.io/pixel-paint/
367 stars 23 forks source link

Make Transparent Background #23

Open Viet281101 opened 1 month ago

Viet281101 commented 1 month ago

What is it?

Description of the changes in your PR

Before/After Screenshots/Screen Record

Fixes the following issue(s)

Reasons for doing this PR

I like drawings with transparent backgrounds so it's easier to use them without having to use external conversion tools to change the background color from white to transparent with icon images or something else. Beside, if you still want the white background as before you can still use white fill on the canvas before starting your painting.

Kully commented 1 month ago
  • Changed script.js and eventHandlers.js so that the background can be transparent on the canvas and when save images to PNG

This sounds like a really convenient change!

Viet281101 commented 1 month ago

I only changed 2 lines in the JS, the rest is to create the grid board background with css and barely touched the other parts 😅. Small change but big improvement. Tell me if you like this version of pixel paint and give this PR a review. Or if you want to adjust the size of the squares in the grid board background For example: Screenshot from 2024-05-25 18-52-36

Or

Screenshot from 2024-05-25 18-53-27

Or

Screenshot from 2024-05-25 18-53-06

Although the third one would probably make the grid tool redundant. So in my opinion the second one iz the best.

Kully commented 1 month ago

Although the third one would probably make the grid tool redundant. So in my opinion the second one iz the best.

I was gonna say the 3rd one but you've convinced me with this comment. It does make the grid more redundant. Let's go with the 2nd one 👍