#1640 closed defect (fixed)
Texture conversion fails with grayscale PNGs
Reported by: | historic_bruno | Owned by: | ben |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 19 |
Component: | Core engine | Keywords: | codec |
Cc: | Patch: |
Description
On some systems like mine, the conversion from 8-bit Grayscale PNG to 32-bit RGBA (tex_transform_to
) silently fails, leading to a crash in NVTT's InputOptions::setMipmapData
which expects 32-bit RGBA data. For now the workaround is to not add grayscale PNGs to the game's data :) The solution probably involves extending plain_transform
to correctly handle grayscale data.
Change History (9)
comment:1 by , 12 years ago
comment:4 by , 9 years ago
Re #3082, Deiz brought up a good point: the libpng API can be used to do some transformations. Here is an article describing a few: http://www.vias.org/pngguide/chapter13_08.html
We could use the GDK Pixbuf library (LGPL) as a reference: https://www.imagemagick.org/subversion/librsvg/trunk/gdk-pixbuf/gdk-pixbuf/io-png.c
comment:6 by , 9 years ago
Going to use this ticket as a placeholder for the other PNG formats we could support. The changes required seem relatively simple, we just need time to test the changes (not days before a release).
comment:7 by , 9 years ago
Milestone: | Backlog → Alpha 19 |
---|---|
Priority: | Nice to Have → Should Have |
Example of texture that causes the crash: art/textures/skins/gaia/decal_quarry_savanna_a_spec.png