Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix generating terrain icon with certain image formats. #84507

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

SaracenOne
Copy link
Member

Closes #84506

@SaracenOne SaracenOne added bug topic:editor topic:2d cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release labels Nov 6, 2023
@SaracenOne SaracenOne added this to the 4.3 milestone Nov 6, 2023
@YuriSizov YuriSizov requested review from groud and KoBeWi and removed request for groud November 6, 2023 13:04
scene/resources/tile_set.cpp Outdated Show resolved Hide resolved
@KoBeWi
Copy link
Member

KoBeWi commented Nov 6, 2023

texture->get_image() does not return a reference to the texture's image, but it's copy. Thus it's redundant to have 2 Image variables.

@SaracenOne
Copy link
Member Author

@KoBeWi Well, I removed the redunant extra format variable, but I'm looking over the code again and I'm confused what you mean in regards to the image variables.

@KoBeWi
Copy link
Member

KoBeWi commented Nov 6, 2023

Ok disregard my comment. I missed that src_image is used twice, otherwise you could just reuse the dst_image ref.

@akien-mga akien-mga merged commit 74880ab into godotengine:master Dec 4, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@YuriSizov YuriSizov removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Dec 5, 2023
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image error when generating preview icon for non RGBA8 terrain tiles
4 participants