projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Vagrantfile for building on VirtualBox
[ctsim.git]
/
libctsim
/
imagefile.cpp
diff --git
a/libctsim/imagefile.cpp
b/libctsim/imagefile.cpp
index eeda46d37d4300f4662d15ac2924fa88ebdaa311..623b4e32c265de5b75abdc46531bab1088b546ab 100644
(file)
--- a/
libctsim/imagefile.cpp
+++ b/
libctsim/imagefile.cpp
@@
-264,6
+264,7
@@
ImageFile::printStatistics (std::ostream& os) const
if (isComplex())
os << "Real Component Statistics" << std::endl;
if (isComplex())
os << "Real Component Statistics" << std::endl;
+ os << std::setprecision(7);
os << " min: " << min << std::endl;
os << " max: " << max << std::endl;
os << " mean: " << mean << std::endl;
os << " min: " << min << std::endl;
os << " max: " << max << std::endl;
os << " mean: " << mean << std::endl;
@@
-1545,8
+1546,8
@@
ImageFile::readImagePNG (const char* const pszFile)
if (!fp)
return false;
unsigned char header[8];
if (!fp)
return false;
unsigned char header[8];
- fread (header, 1, 8, fp);
- if (png_sig_cmp (header, 0, 8)) {
+
int n =
fread (header, 1, 8, fp);
+ if (
n != 8 ||
png_sig_cmp (header, 0, 8)) {
fclose (fp);
return false;
}
fclose (fp);
return false;
}