KhronosGroup / KTX-Software

KTX (Khronos Texture) Library and Tools
Other
861 stars 225 forks source link

CLI crashes when using `--assign-oetf srgb|linear` #795

Closed Calinou closed 9 months ago

Calinou commented 10 months ago

OS: Fedora 38 x86_64 KTX Software version: 4.3.0-alpha3 (does not occur in 4.2.1)

The CLI crashes when using --assign-oetf srgb or --assign-oetf linear (with the appropriate format chosen):

./ktx create --assign-oetf srgb --format R8G8B8A8_SRGB input.png output.ktx
ktx create warning: No color primaries in PNG input file "input.png", defaulting to BT.709.
[1]    51444 segmentation fault (core dumped)  ./ktx create --assign-oetf srgb --format R8G8B8A8_SRGB

If I don't specify this option, I get the following error instead:

ktx create warning: No color primaries in PNG input file "input.png", defaulting to BT.709.
ktx create fatal: Input file "input.png" contains unsupported ICC profile "icc". Use --assign-oetf to specify adifferent one.

Input image:

godot_icon_ktx

MarkCallow commented 10 months ago

@aqnuep please take a look.

aqnuep commented 10 months ago

This seems to work with the latest code in main. Could have been another corner case that I've fixed related to color-space handling a couple of months ago.

arpu commented 10 months ago

any plans for new release soon?

MarkCallow commented 9 months ago

any plans for new release soon?

As soon as I fix issues 774, 791 and 796.

This issue is fixed in main. Closing.