Misc changes.

pull/216/head
castano 12 years ago
parent bff3dab505
commit ac3f2d1794

@ -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.

@ -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)
{

Loading…
Cancel
Save