Skip to content
Snippets Groups Projects
Commit fb522ee8 authored by Manuel Grizonnet's avatar Manuel Grizonnet
Browse files

BUG:set shrink factor to 1 if image size is lower than 1000

parent 33491566
No related branches found
No related tags found
No related merge requests found
...@@ -111,7 +111,7 @@ int generic_main_convert(otb::ApplicationOptionsResult* parseResult) ...@@ -111,7 +111,7 @@ int generic_main_convert(otb::ApplicationOptionsResult* parseResult)
// Shrink factor is computed so as to load a quicklook of 1000 // Shrink factor is computed so as to load a quicklook of 1000
// pixels square at most // pixels square at most
typename InputImageType::SizeType imageSize = reader->GetOutput()->GetLargestPossibleRegion().GetSize(); typename InputImageType::SizeType imageSize = reader->GetOutput()->GetLargestPossibleRegion().GetSize();
unsigned int shrinkFactor = std::max(imageSize[0], imageSize[1])/1000; unsigned int shrinkFactor = std::max(imageSize[0], imageSize[1]) < 1000 ? 1 : std::max(imageSize[0], imageSize[1])/1000;
std::cout<<"Shrink factor: "<<shrinkFactor<<std::endl; std::cout<<"Shrink factor: "<<shrinkFactor<<std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment