diff --git a/modules/imgcodecs/src/grfmt_gdal.cpp b/modules/imgcodecs/src/grfmt_gdal.cpp index 1094b91b3..3d3bbb834 100644 --- a/modules/imgcodecs/src/grfmt_gdal.cpp +++ b/modules/imgcodecs/src/grfmt_gdal.cpp @@ -461,7 +461,7 @@ bool GdalDecoder::readData( Mat& img ){ bool GdalDecoder::readHeader(){ // load the dataset - m_dataset = (GDALDataset*) GDALOpen( m_filename.c_str(), GA_ReadOnly); + m_dataset = (GDALDataset*) GDALOpen( m_filename.c_str(), GA_Update); // if dataset is null, then there was a problem if( m_dataset == NULL ){