Definition at line 63 of file ImageArchive.h. References GetImageData(), ILOG_DEBUG, ILOG_ERROR, and NrImages(). 00064 { 00065 if (NrImages() != arg->NrImages()) 00066 { 00067 ILOG_ERROR("Diff: nrImages differs: " << NrImages() << " vs " << 00068 arg->NrImages()); 00069 return 1; 00070 } 00071 int nDiff = 0; 00072 for (int i=0 ; i<NrImages() ; i++) 00073 { 00074 size_t size1 = 0; 00075 UInt8* data1 = GetImageData(i, size1); 00076 size_t size2 = 1; 00077 UInt8* data2 = arg->GetImageData(i, size2); 00078 if (size1 != size2) 00079 { 00080 ILOG_DEBUG("image " << i << " size differs " << size1 << " vs " 00081 << size2); 00082 nDiff++; 00083 } 00084 else 00085 { 00086 for (int j=0 ; j<size1 ; j++) 00087 { 00088 if (data1[j] != data2[j]) 00089 { 00090 ILOG_DEBUG("image " << i << " byte " << j << " differs"); 00091 nDiff++; 00092 break; 00093 } 00094 } 00095 } 00096 delete data1; 00097 delete data2; 00098 } 00099 if (nDiff > 0) 00100 ILOG_ERROR("Diff: found " << nDiff << " differences"); 00101 return nDiff; 00102 }
Here is the call graph for this function:
|