nsimplex/ktools

ktech: Alpha channel issue

Opened this issue · 1 comments

There seems to be an issue with images containing low alpha channel values.

Running:
$ ktech transparency_test.{png,tex} && ktech transparency_test.tex{,.png}
on this image:
transparency_test
results in this image:
transparency_test tex

Kinda sad. 5 years and no answers. For those, who stumbles upon this issue:

It seems that this is due to alpha premultiplication, which is enabled by default. There is an option --no-premultiply that doesn't really do anything, as it's disabled (see #20) for some reason. But enabling it gives you control over this behaviour and can be used as a quick fix of this issue:

$ ktech --no-premultiply transparency_test.{png,tex} && ktech transparency_test.tex{,.png}