mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2025-12-17 02:57:48 +08:00
Merge 99c2460976bf0d80b13acf20be5595466a3b5014 into 9c688d7ff78455ed42e345124d1495aad6bf66de
This commit is contained in:
commit
d96439a9d0
@ -96,6 +96,9 @@ namespace npp
|
|||||||
// swap the user given image with our result image, effecively
|
// swap the user given image with our result image, effecively
|
||||||
// moving our newly loaded image data into the user provided shell
|
// moving our newly loaded image data into the user provided shell
|
||||||
oImage.swap(rImage);
|
oImage.swap(rImage);
|
||||||
|
|
||||||
|
// unloads the image loaded by FreeImage_Load
|
||||||
|
FreeImage_Unload(pBitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save an gray-scale image to disk.
|
// Save an gray-scale image to disk.
|
||||||
@ -122,6 +125,9 @@ namespace npp
|
|||||||
bool bSuccess;
|
bool bSuccess;
|
||||||
bSuccess = FreeImage_Save(FIF_PGM, pResultBitmap, rFileName.c_str(), 0) == TRUE;
|
bSuccess = FreeImage_Save(FIF_PGM, pResultBitmap, rFileName.c_str(), 0) == TRUE;
|
||||||
NPP_ASSERT_MSG(bSuccess, "Failed to save result image.");
|
NPP_ASSERT_MSG(bSuccess, "Failed to save result image.");
|
||||||
|
|
||||||
|
// unloads the image loaded by FreeImage_Allocate
|
||||||
|
FreeImage_Unload(pBitmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load a gray-scale image from disk.
|
// Load a gray-scale image from disk.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user