Browse Source

fix bug with 16-bit png files

David Rose 20 years ago
parent
commit
967e080376
1 changed files with 1 additions and 1 deletions
  1. 1 1
      panda/src/pnmimagetypes/pnmFileTypePNG.cxx

+ 1 - 1
panda/src/pnmimagetypes/pnmFileTypePNG.cxx

@@ -734,7 +734,7 @@ write_data(xel *array, xelval *alpha_data) {
         pi++;
       }
 
-    } else if (png_bit_depth > 255) {
+    } else if (png_bit_depth > 8) {
       for (int xi = 0; xi < _x_size; xi++) {
         if (save_color) {
           xelval red = PPM_GETR(array[pi]);