diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp index 2a25c08f260..af2615f9cfd 100644 --- a/editor/import/resource_importer_texture.cpp +++ b/editor/import/resource_importer_texture.cpp @@ -431,8 +431,8 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String int width = image->get_width(); image->lock(); - for (int i = 0; i < height; i++) { - for (int j = 0; j < width; j++) { + for (int i = 0; i < width; i++) { + for (int j = 0; j < height; j++) { image->set_pixel(i, j, image->get_pixel(i, j).inverted()); } }