Pasting limited palette images from irfanview produces black boxes

This is in the beta branch, 1.3 beta5 x64

Replication steps:

1)Open an existing png image (like the one I uploaded here) in irfanview.
AsepritePasteBugTest

2)Use irfanview’s ‘reduce color depth’ algorithm on it to reduce the color depth to 6 colors (set to best quality, no dithering). Nothing will change visually since the image already has only 6 colors.

3)Select the image in irfanview, and copy and paste it into a different image program.

Expected result: The carpet shows up in Asesprite with the normal blue and gold colors. This is how it works if I paste this image into photoshop, ms paint, or imgur, so I don’t think the issue is on irfanview’s end.

Bugged result: If I paste into Aseprite, the carpet shows up as a rectangle of solid color with no texture. In indexed mode the rectangle is the color in palette index #1, in RGB mode it’s a solid block of pure black.

I don’t know if this is related to the previously fixed issue from last year with colors getting garbled when pasting from firefox into asesprite or not.

1 Like

I used Image → Decrease Color Depth… in IrfanView to custom 6 colors. Then Image → Information shows that it’s now 16 colors image. When I insert into Aseprite it appears as black box.

Without Decrease Color Depth step it’s copied as expected.

Apparently Aseprite fails to decode (4-bit?) color information from clipboard correctly, only decoding width and height. According to FreeClipViewer (portable version) there are several images in clipboard after copy from IrfanView. They are: Bitmap DIB, Bitmap DIBV5. Maybe Aseprite takes one of them and fails to decode palette correctly.

1 Like