Skip to content
Snippets Groups Projects
Commit c00714f0 authored by Mickael Savinaud's avatar Mickael Savinaud
Browse files

ENH: manage the case where the file have already overviews

parent 2eb0ecab
No related branches found
No related tags found
No related merge requests found
......@@ -496,6 +496,9 @@ unsigned int GDALImageIO::GetOverviewsCount()
return dataset->GetRasterBand(1)->GetOverviewCount();
}
if (dataset->GetRasterBand(1)->GetOverviewCount())
return dataset->GetRasterBand(1)->GetOverviewCount();
// default case: compute overviews until one of the dimensions is 1
bool flagStop = false;
unsigned int possibleOverviewCount = 0;
......
......@@ -56,9 +56,9 @@ int otbGDALOverviewsBuilder(int itkNotUsed(argc), char* argv[])
io->SetFileName(inputFilename);
io->CanReadFile(inputFilename);
io->ReadImageInformation();
//std::cout << io->GetNumberOfOverviews() << std::endl;
//std::cout << io->GetOverviewsCount() << std::endl;
if (io->GetNumberOfOverviews() != static_cast<unsigned int>(nbResolution)-1 )
if (io->GetOverviewsCount() != static_cast<unsigned int>(nbResolution)-1 )
return EXIT_FAILURE;
return EXIT_SUCCESS;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment