ktools
ktools copied to clipboard
ktech: Alpha channel issue
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:
results in this image:

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 https://github.com/nsimplex/ktools/pull/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}