Use references to images from image loader.

In general, we should really copy the images with the built-in Clone()
function, but then we'd need to manage memory, etc. To avoid that headache,
we can simply just use references.
This commit is contained in:
Pavel Krajcevski 2014-03-12 13:18:56 -04:00
parent a51e63f5c0
commit f1b5bc3831

View File

@ -77,8 +77,8 @@ int main(int argc, char **argv) {
return 1; return 1;
} }
FasTC::Image<> img1(*img1f.GetImage()); FasTC::Image<> &img1 = *img1f.GetImage();
FasTC::Image<> img2(*img2f.GetImage()); FasTC::Image<> &img2 = *img2f.GetImage();
double PSNR = img1.ComputePSNR(&img2); double PSNR = img1.ComputePSNR(&img2);
if(PSNR > 0.0) { if(PSNR > 0.0) {