getting image sizes under control