Output GDAL library version in CMake status output.

This commit is contained in:
Alexander Smorkalov 2025-09-30 15:23:43 +03:00
parent 0e88b49a53
commit ebb5b3037e
2 changed files with 2 additions and 2 deletions

View File

@ -1589,7 +1589,7 @@ if(WITH_OPENEXR OR HAVE_OPENEXR)
endif() endif()
if(WITH_GDAL OR HAVE_GDAL) if(WITH_GDAL OR HAVE_GDAL)
status(" GDAL:" HAVE_GDAL THEN "YES (${GDAL_LIBRARY})" ELSE "NO") status(" GDAL:" HAVE_GDAL THEN "${GDAL_LIBRARY} (ver ${GDAL_VERSION})" ELSE "NO")
endif() endif()
if(WITH_GDCM OR HAVE_GDCM) if(WITH_GDCM OR HAVE_GDCM)

View File

@ -239,7 +239,7 @@ void write_pixel( const double& pixelValue,
else if( image.depth() == CV_32S ){ image.ptr<Vec3i>(row)[col] = Vec3i(newValue,newValue,newValue); } else if( image.depth() == CV_32S ){ image.ptr<Vec3i>(row)[col] = Vec3i(newValue,newValue,newValue); }
else if( image.depth() == CV_32F ){ image.ptr<Vec3f>(row)[col] = Vec3f(newValue,newValue,newValue); } else if( image.depth() == CV_32F ){ image.ptr<Vec3f>(row)[col] = Vec3f(newValue,newValue,newValue); }
else if( image.depth() == CV_64F ){ image.ptr<Vec3d>(row)[col] = Vec3d(newValue,newValue,newValue); } else if( image.depth() == CV_64F ){ image.ptr<Vec3d>(row)[col] = Vec3d(newValue,newValue,newValue); }
else{ throw std::runtime_error("Unknown image depth, gdal:1, img: 3"); } else{ throw std::runtime_error("Unknown image depth, gdal:1, img: 3"); }
} }
// input: 3 channel, output: 1 channel // input: 3 channel, output: 1 channel