steffest / DPaint-js

Webbased image editor, modeled after the legendary Deluxe Paint with a focus on retro Amiga file formats: read and write Amiga icon files and IFF ILBM images
https://www.stef.be/dpaint/
MIT License
481 stars 28 forks source link

Reduce Colors - very destructive operation? #36

Open teadrinker opened 2 weeks ago

teadrinker commented 2 weeks ago

It's a bit unclear how the reduce colors operate... first I thought that each layer could reduce colors while preserving the full color internally (the slider seemed to indicate this). However, it seems it copies the current state as input and write the decimated image to the current layer, and it keeps the old flattened-state globally (so that you can preview different reduction settings)

It also seems color reduction operation cannot be undo:ed... This behaviour feels scary...

Perhaps an "enable-checkbox" could be added at the top of the the reduce-colors-section, and when you press enable, a new layer will be created (at the top) which the decimated image will be written to. a button "Ok/Keep layer" appears. If you just disable the checkbox the new layer is deleted and button disappears. If you click the ok-button, layer is kept and enable-checkbox is turned off.

(there are probably better solutions, this is just what I came up with now...)

steffest commented 2 weeks ago

Yeah... The "reduce color" part originated from a time when I didn't have layers implemented. They currently clash a bit. (I like to hide myself behind the "it's still alpha and there are bugs, you know" excuse :-) )

Future plans are to branch that "reduce colors" panel to a separate window with more finegrained options like "apply only to current layer" or "apply to all layers" or "flatten before apply and output to new layer" etc. At the same time, I'd like to add sliders to adjust e.g. brightness/saturation/contrast in the same step as this can greatly improve the output. Future plans... there are always future plans.

teadrinker commented 2 weeks ago

it's still alpha and there are bugs

totally understand :) it's already super cool. Just wrote down my experience in case it might be useful!

Future plans are to branch that "reduce colors" panel to a separate window with more finegrained options like "apply only to current layer" or "apply to all layers" or "flatten before apply and output to new layer" etc. At the same time, I'd like to add sliders to adjust e.g. brightness/saturation/contrast in the same step as this can greatly improve the output.

yes brightness/saturation/contrast would be very useful!

I think having a special layer would give better workflow than a dialog/window generating normal pixel layers. The way I imagine it, it would always operate on things below, and remember all the settings, so you can easily disable the layer, do changes to full color version, and turn it on again to apply the same reduction...

steffest commented 2 weeks ago

Hmmm.... then the color reduction would work a bit like an adjustment layer in PhotoShop, where you still can access and alter the underlying "source layers" .... Dang, that's actually a very good idea. I'll let it simmer for a while. Thanks! Food for thoughts, I like it. 👍