Merge pull request #21694 from guilhermefelipecgs/fix_invert_color

[Texture Import] Fix invert color
This commit is contained in:
Rémi Verschelde 2018-09-02 17:48:25 +02:00 committed by GitHub
commit cdbc172a55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -431,8 +431,8 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
int width = image->get_width(); int width = image->get_width();
image->lock(); image->lock();
for (int i = 0; i < height; i++) { for (int i = 0; i < width; i++) {
for (int j = 0; j < width; j++) { for (int j = 0; j < height; j++) {
image->set_pixel(i, j, image->get_pixel(i, j).inverted()); image->set_pixel(i, j, image->get_pixel(i, j).inverted());
} }
} }