Add interface to specify color transformations.

This commit is contained in:
castano
2007-11-16 11:52:29 +00:00
parent 5c95f5d5e6
commit 1b73dcaf7e
4 changed files with 44 additions and 2 deletions

View File

@ -459,6 +459,14 @@ bool nvtt::compress(const InputOptions & inputOptions, const OutputOptions & out
img = toFixedImage(floatImage.ptr(), inputOptions.m);
}
// @@ Where to do the color transform?
// - Color transform may not be linear, so we cannot do before computing mipmaps.
// - Should be done in linear space, that is, after gamma correction.
// @@ Error! gamma correction is not performed when mipmap data provied.
// @@ This code is too complicated, too prone to erros, and hard to understand. Must be simplified!
quantize(img, inputOptions.m, format);
compressMipmap(img, outputOptions, compressionOptions.m);