Commit 11b7acbc authored by Vladimír Ulman's avatar Vladimír Ulman
Browse files

Report now also the number of copies of an image that fit into the current free memory.

M    src/tools/imageinfo.cpp
parent 8c18b5ad
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <iostream>
#include <i3d/image3d.h>
#include <i3d/imgfiles.h>
#include <i3d/toolbox.h>
using namespace std;
using namespace i3d;

@@ -39,6 +40,7 @@ template <class VOXEL> void GetImageInfo(Image3d<VOXEL> & image)
	 if (ImageSize > (size_t(1) << 10)) cout << "Image size human: " << (ImageSize >> 10) << " kB\n";
	 else
	 cout << "Image size human: " << ImageSize << " B\n";
	 cout << "Current free memory can host " << i3d::GetFreeMemory()/ImageSize << " copies of this image.\n";
}

int main(int argc, char *argv[])