Fixing image rotate for large image