[Darktable] [solved] Indexed-color PNG corrupt after import

After transitioning to Linux I am also transitioning to Darktable for my graphic & RAW photography collection. Unfortunately Darktable seems to have issues importing some of my PNG art, with the color changing to some sort of grayscale with the image repeating within the canvas. I’ve tried altering most of the straightforward import settings but no effect. Note that this applies to only some of my artwork, for example when using a very basic color palette, as shown in the screenshot. All of the art with this palette corrupts but not exclusively to it. Some other art imports correctly. I’m thinking there’s some parameter or setting I’m missing or maybe there’s a bug.
Linked is a screenshot of the issue with a good preview on the right.
example image
Solution: Darktable does not support PNG files that are exported with Indexed colors.

Cannot see your images. Could be an OpenCL issue due to broken driver.

I have just reproduced the issue on a more modern desktop system with the same Mint 22 that supports the latest and different nvidia drivers, unfortunately the issue persists. I have updated the image link.

That’s just a screenshot. Can you share the problematic PNG + sidecar? And just to make sure, have you tried with OpenCL disabled in config?

If this is glitch art, then you’ll likely have problems.

That’s just a screenshot. Can you share the problematic PNG + sidecar? And just to make sure, have you tried with OpenCL disabled in config?

Yes I have, thanks for making sure. I have linked a zip containing a different artwork + screenshot from Darktable with the same issue. pw: linux
https://www.mediafire.com/file/8lghvjg8qmsfcc7/darktable_issue.zip/file

If this is glitch art, then you’ll likely have problems.

You could call it that but why would that be an issue? Why would a relatively low resolution image (with a basic color palette) cause problems that cannot be solved?

Actual glitch art involves knowingly messing with the data in a file in such a way that the file’s decoder “glitches” (hence the name) and produces some unexpected output. Thus if you have actual glitch art, then this might be what you get, glitches in the decoding.

1 Like

Why did you encrypt it? Since we’re discussing it on an open forum, and the password is next to the download link? Anyway…
In darktable, I see a grey image.

In geeqie, leaf1.png is green. Imagemagick can convert the png into a tif, which is also green (even in darktable).

Now, I don’t know what this is, but it certainly does not look like a leaf…

Steganography? A carefully crafted image to attack PNG decoders?

1 Like

gotcha, no, all the affected art is exported form the unmodified sprite editor Aseprite. While writing that last sentence I thought maybe the indexed color mode that png supports might be the issue. After changing the “color mode” in the editor to “RGB color” instead of “indexed” and exporting again Darktable now displays the image correctly.

Well, whatever you see in my art is what it becomes is so yes it is all of those things. Obviously I did not share any significant work but at least we learned from it that Darktable does not like PNG files exported with indexed colors.

Which is worth a bug report. Indexed png does not load properly · Issue #17991 · darktable-org/darktable · GitHub

1 Like

You created that quicker than I could think about doing it! Thank you for being helpful.

@x64 The images that are imported correctly don’t have transparency, right?