Parcourir la source

support broken SGI formats

David Rose il y a 23 ans
Parent
commit
5ad999efa5
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      panda/src/pnmimagetypes/pnmFileTypeSGIReader.cxx

+ 4 - 0
panda/src/pnmimagetypes/pnmFileTypeSGIReader.cxx

@@ -266,11 +266,15 @@ read_header(istream *ifp, Header *head, const string &magic_number) {
       return false;
     }
 
+    // Actually, some old broken SGI image writers put garbage in this
+    // field, so just ignore it.
+    /*
     if (head->colormap != CMAP_NORMAL) {
       pnmimage_sgi_cat.error()
         << "Unsupported non-normal pixel data (" << head->colormap << ")\n";
       return false;
     }
+    */
 
     /* adjust ysize/zsize to dimension, just to be sure */