AsepriteScripts icon indicating copy to clipboard operation
AsepriteScripts copied to clipboard

Exporting Slices Corrupts RGB Values for Zero-Alpha Pixels

Open nnevatie opened this issue 7 months ago • 2 comments

Describe the bug Using the script to export slices causes the edgemost pixels outside the sprite's non-zero alpha to have corrupted RGB values. This is an issue when applying premultiplied alpha in rendering the exported slices.

To Reproduce

  1. Download the sprite with slices here: https://drive.google.com/file/d/1VL9wc6WL6vdYmgr4vBl40FI3NwAyiDZQ/view?usp=sharing
  2. Export the slices of the sprite manually.
  3. Export the slices of the sprite by using the script export_slices.
  4. Observe the RGB values of the two versions, near the visible edges of the exported slices.
  5. Observe the manually exported slices correctly having zero RGB (0, 0, 0) for zero alpha.
  6. Observe the scripted exports having non-zero RGB for the same pixels.

Expected behavior The scripted export should be identical to the manual export in terms of RGB values for the pixels.

Screenshots

System Information:

  • Windows 11
  • Aseprite version v1.3.7-x64
  • export_slices
  • Script commit: 2424a1f005cb7734ba6321c89e29b57f8d228716

Additional context

nnevatie avatar Jul 18 '24 08:07 nnevatie