Use getMaxImageSize() instead of getDetectorImageSize()