Unexpected aliasing on shape layers when exporting with Save for Web
- April 22, 2024
- 5 Antworten
- 3030 Ansichten
This issue has been giving me issues for quite a long time and I've finally tracked down the issue. When exporting images in Photoshop using the legacy Save for Web interface, which is particularly useful for pixel art, if there are shape layers, when scaling the image down, unintended aliasing appears around the edges of the shapes, particularly in areas where the rectangular bounds seem to overlap. This produces noticable, visual artifacts that should never be there.
This is happening on Photoshop 25.6.0 on Windows 11.
Here are the steps to reproduce:
- Create a new document, fairly large at about 2000x2000.
- Draw a red triangle on one side of the canvas.
- Create a circle somewhere else on the canvas, away from the triangle.
- Go to the Save for Web dialog.
- Scale the image down. Even as little as 1 pixel makes a difference but it's more noticable if it's scaled down more, like down to 200x200
- The original image on the left or top will have a slight red ring around the white circle.
A possible workaround is if the layers are exported separately instead of at the same time. Another possible workaround is if the red triangle layer is above the white circle, but this isn't always possible depending on the art. Rasterizing the layers does not work, but it does change how the aliasing turns out.
Attached is an example of how the image comes out if I set it to an indexed PNG-8 image with transparency and matting disabled. There's a clear red ring around the white circle that shouldn't be there.
