diff --git a/src/nvimage/Quantize.cpp b/src/nvimage/Quantize.cpp index 889a8c2..4aaf3bb 100644 --- a/src/nvimage/Quantize.cpp +++ b/src/nvimage/Quantize.cpp @@ -85,8 +85,8 @@ void nv::Quantize::FloydSteinberg_BinaryAlpha( Image * image, int alpha_threshol memset(row0, 0, sizeof(float)*(w+2)); memset(row1, 0, sizeof(float)*(w+2)); - for(uint y = 0; y < h; y++) { - for(uint x = 0; x < w; x++) { + for (uint y = 0; y < h; y++) { + for (uint x = 0; x < w; x++) { Color32 pixel = image->pixel(x, y); @@ -94,7 +94,7 @@ void nv::Quantize::FloydSteinberg_BinaryAlpha( Image * image, int alpha_threshol int alpha = int(pixel.a) + int(row0[1+x]); // Convert color. - if( alpha > alpha_threshold ) pixel.a = 255; + if (alpha > alpha_threshold) pixel.a = 255; else pixel.a = 0; // Store color. diff --git a/src/nvtt/tools/compress.cpp b/src/nvtt/tools/compress.cpp index 8ac5a16..c296b32 100644 --- a/src/nvtt/tools/compress.cpp +++ b/src/nvtt/tools/compress.cpp @@ -497,11 +497,11 @@ int main(int argc, char *argv[]) if (format == nvtt::Format_BC2) { // Dither alpha when using BC2. - compressionOptions.setQuantization(false, true, false); + compressionOptions.setQuantization(/*color dithering*/false, /*alpha dithering*/true, /*binary alpha*/false); } else if (format == nvtt::Format_BC1a) { // Binary alpha when using BC1a. - compressionOptions.setQuantization(false, true, true, 127); + compressionOptions.setQuantization(/*color dithering*/false, /*alpha dithering*/true, /*binary alpha*/true, 127); } else if (format == nvtt::Format_RGBA) {