Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using a background layer, switching to Indexed Color Mode fills all layer bounding rectangles with Color 0 #4438

Open
hsandt opened this issue Apr 26, 2024 · 1 comment · May be fixed by #4532

Comments

@hsandt
Copy link

hsandt commented Apr 26, 2024

I added a Background layer (right-click > Convert To... > Background) to my project, made sure that my color palette had all used colors in it (including Background color and transparent color), then switched from RGB to Indexed Color Mode.

I noticed bounding rectangle of each layer being filled with the Color at position 0 in the palette.

To make it obvious, I created a MWE where it's a flashy green:

image

Using two layers, including a Background, underlined:

image

The original image:

image

Switching to Indexed Color Mode:

image

Workaround: move transparent color to Index 0 so bounding boxes are filled with transparency so nothing happens.

MWE

aseprite_MWE_switch_to_indexed_colored_mode_fills_all_rectangles_with_color0.zip

Notes

Aseprite and System version

  • Aseprite version: version number, installer/portable/Steam/beta/dev/commit-hash
  • System: Windows/macOS/Linux, version, distribution
@Gasparoken
Copy link
Member

Thanks for this report. I was able to reproduce it easily with the document you attached.

@Gasparoken Gasparoken self-assigned this May 15, 2024
Gasparoken added a commit to Gasparoken/aseprite that referenced this issue Jun 12, 2024
…lls all layer bounding rectangles with Color 0 (fix aseprite#4438)

Conditions to reproduce the original issue:
- Opaque RGBA sprite, i.e. the bottom layer is 'Background'.
- There is a second layer with some non-filled-box image (like a ellipse).
- There is a mask color #000000 alpha=0 is in the palette.
- The mask color index is greater and not equal than 0.
- Go to Sprite > Color Mode > Indexed.
Result: the transparent color in the second layer (ellipse one) will turn to color entry = 0 (usually black).
Gasparoken added a commit to Gasparoken/aseprite that referenced this issue Jun 12, 2024
fills all layer bounding rectangles with Color 0 (fix aseprite#4438)

Conditions to reproduce the original issue:
- Opaque RGBA sprite, i.e. the bottom layer is 'Background'.
- There is a second layer with an ellipse (for example).
- There is a mask color #000000 alpha=0 is in the palette.
- The mask color index is greater and not equal than 0.
- Go to Sprite > Color Mode > Indexed.
Result: the transparent color of the second layer will change to
index color = 0 (usually black).

Also added a test.
Gasparoken added a commit to Gasparoken/aseprite that referenced this issue Jun 12, 2024
…lls all layer bounding rectangles with Color 0 (fix aseprite#4438)

Conditions to reproduce the original issue:
- Opaque RGBA sprite, i.e. the bottom layer is 'Background'.
- There is a second layer with an ellipse (for example).
- There is a mask color #000000 alpha=0 is in the palette.
- The mask color index is greater and not equal than 0.
- Go to Sprite > Color Mode > Indexed.
Result: the transparent color of the second layer will change to
index color = 0 (usually black).

[lua] Add test for RGBA->INDEXED conversion
Gasparoken added a commit to Gasparoken/aseprite that referenced this issue Jun 12, 2024
…ite#4438)

Original issue title: When using a background layer, switching to
Indexed Color Mode fills all layer bounding rectangles with
Color 0.
Conditions to reproduce the original issue:
- Opaque RGBA sprite, i.e. the bottom layer is 'Background'.
- There is a second layer with an ellipse (for example).
- There is a mask color #000000 alpha=0 is in the palette.
- The mask color index is greater and not equal than 0.
- Go to Sprite > Color Mode > Indexed.
Result: the transparent color of the second layer will change to
index color = 0 (usually black).

Also added test for RGBA->INDEXED conversion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment