1j01 / jspaint

🎨 Classic MS Paint, REVIVED + ✨Extras
https://jspaint.app/about
MIT License
7.25k stars 568 forks source link

For that real RetroFuture Feel: Support for Palette Textures ala paint.exe & dithering ala pbrush.exe? #178

Open no-identd opened 4 years ago

no-identd commented 4 years ago

You know you want it. It's where the REAL power is, and arguably the feature MOST missing from all modern versions of Paint.

Here's the textures from the original paint.exe from Windows 1.01:

image

And here you can see an example of dithering in pbrush.exe from Windows 3.1:

image

On monochrome/grayscale systems, pbrush.exe would revert to textures similar to the ones from paint.exe, but unfortunately, I don't have screenshots of those right now.

Both of these features made the original versions of paint significantly more powerful tools than what we have today, as they allowed for all kinds of different surface texturing.

1j01 commented 4 years ago

FYI, I already support some patterns. Check out Image > Attributes... > Black and White. And I made it so you can stay in "black and white mode" (which here is just a different palette), while keeping the image in color if you want. And you can use the Color Eraser (right click with Eraser) to turn the black and white dithers into other colors.

But if you want other patterns, where do you suggest they be accessed from? And how should that work? Should it be combinable with any colors?

no-identd commented 4 years ago

And I made it so you can stay in "black and white mode" (which here is just a different palette), while keeping the image in color if you want.

Oh. I see! Seems like a bit of an abuse of the "Cancel" button, tho, but, even so, very nice!

And you can use the Color Eraser (right click with Eraser) to turn the black and white dithers into other colors.

huh? How does that work? I can't seem to figure it out unfortunately.

But if you want other patterns, where do you suggest they be accessed from? And how should that work? Should it be combinable with any colors?

I'll think about it!

1j01 commented 4 years ago

To use the Color Eraser, change the foreground color to the color you want to "erase" and the background color to the color you want to replace it with. Then, right-click with the eraser to replace the specific color in areas of the image. (It's a color replacement function, but it's designed to be analogous to "erasing" presumably so they could include it as a little extra feature without needing another tool button, and so it's easier to remember which color to select as foreground/background.)

Seems like a bit of an abuse of the "Cancel" button

Yes, definitely. It's confusing/awkward UX. I couldn't think of a good way to label or structure things to make this clear, while keeping the functionality. I considered adding a "Do you want to convert the image to monochrome?" dialog just to make it clear that the Cancel would refer to just the conversion to monochrome, but that felt tedious (and not that clarifying). "Keep Color" would probably be better than "Cancel", but it still wouldn't be totally clear that it's not meant to restore the palette. ("Color" is also the name of the mode. And "Keep Color In Document" would be very long for a button.)

I could make Cancel return to Color mode (as is probably expected) if we come up with a better way to access patterned palettes.

no-identd commented 4 years ago

To use the Color Eraser, change the foreground color to the color you want to "erase" and the background color to the color you want to replace it with. Then, right-click with the eraser to replace the specific color in areas of the image.

Oh I see! This seems buggy when having the image transparency set to transparent, the replacement mode doesn't seem to properly work in that case. I can raise a separate issue for this if you want.

I thought about this UI issue for a bit now and it seems like a case of not seeing the forest for the trees:

Why not just simply make the palette bigger, or add a second palette box? There's plenty of real estate nowadays. Could even name it "Texture Box", and make it independent of the color box. One sets color, the other texture. Perfect scope separation. :) Plus, that resolves the "What to do with the conversion dialog" question very uh... completely.

This leaves open the question of how to handle color dithering however, but honestly, I at the moment feel unsure about how that worked in pbrush.exe back in the day, I'd have to boot up some VMs to investigate the exact behavior(s).