Wish: Flatten selected layers

Hi David,

I would like to flatten only selected layers.




Hi @Mike, actually this is not possible yet. Moving this to the #features category, related to this comment.

1 Like

Hi @dacap , I think that to be able to “Flatten a Layer Group” would be also an interesting feature. As I think it’s closely related to this post I wrote it here instead of creating a new one, I hope I’m not mistaken ^^U

What I’m doing now (in case somebody is interested) is just copying the layer group to a new document, flattening it and then copying it back, but it sure would be great to do that on a key pressing or two :slight_smile:

1 Like

From another forum on the web… “Merge vs Flattening - No difference in quality. Merge allows you to combine certain layers and leave others unflattened. Flatten will collapse them all”

1 Like

The idea for a new “merge” feature would be to be able to:

  1. merge selected layers (I have to think about special cases were layers inside a group are selected with layers outside the group
  2. merge all layers inside a group
  3. merge everything (flatten)

Actually there is a difference. If you have two layers with the bottom layer say 50% opacity, if you merge down the top layer will be at 50% opacity. If you flatten however the opacity doesn’t change for the top layer.

This would be a great feature as im doing the copy to new document, flatten, move back thing right now. :frowning:


oh yes that’s right, I’d forgotten about that.

who uses opacity in pixel art anyways?

Lots of people? I’m not sure if this is a serious question or not.

opacity makes a lot of new colours appear, and it ruins the palette
probably people use it but not for pixel art

I’m not sure where you get your information but people use it all the time in pixel art.
Perhaps you just don’t know how to use it properly? At any rate this conversation is
no helpful to this thread. If you want to know how or why to use opacity in pixel art
i’d suggest starting a new thread.

@dacap Would it be any simpler to allow flatten to work with only visible layers?
It looks like currently it loops through all the frames, could it be changed to loop through
all the layers first, skipping non visible layers, then get the frame for that layer?
Then at the bottom only delete visible layers?

1 Like

Hi @willt, sorry, but I’m not sure if I understood it correctly. A possible idea for a future Flatten would be to merge all visible layers and remove them, but layers that are hidden shouldn’t be removed.


I think flatten could be done 1 of 3 ways.

  1. Flatten all layers.
  2. Flatten only visible layers
  3. Flatten selected layers.

I was saying currently in code (if im reading it correctly) the way flatten works is by iterating over each frame in the image and writing each cell the the new flattened layer.

I was wondering if it would be simpler to implement this feature as “flatten by visible layers” and then iterate over each layer, skipping the ones that aren’t visible and then applying the frame/cell logic.

But now that im thinking about it, it sounds like it would be better to just do it the current way and check if the frame is on a visible layer or not (if thats possible).

I think it’s important to realize that merge down and flatten behave differently. (If not intentionally then its a “feature” (bug))

Hope that made sense. If not disregard my ramblings and think of if flatten by visible layer would be a good feature. :slight_smile: