Skip to content

Fix image download example code #108230

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

Merged
merged 1 commit into from
Jul 7, 2025
Merged

Conversation

Miziziziz
Copy link
Contributor

using "https://placehold.co/512" as the url will cause image.load_png_from_buffer(body) to throw ERR_FILE_CORRUPT, need to specify that it's a png file in the url.

using "https://placehold.co/512" as the url will cause image.load_png_from_buffer(body) to throw ERR_FILE_CORRUPT, need to specify that it's a png file in the url.
@Miziziziz Miziziziz requested a review from a team as a code owner July 3, 2025 04:34
Copy link
Member

@timothyqiu timothyqiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. The default format is SVG.

@AThousandShips AThousandShips changed the title fix image download example code Fix image download example code Jul 3, 2025
@AThousandShips AThousandShips added this to the 4.5 milestone Jul 3, 2025
@AThousandShips AThousandShips added cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release and removed topic:network labels Jul 3, 2025
@@ -90,7 +90,7 @@
http_request.request_completed.connect(self._http_request_completed)

# Perform the HTTP request. The URL below returns a PNG image as of writing.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment on both the GDScript and C# example is quite redundant, especially now that the extension is specified in the passed URL.

@Repiteo Repiteo merged commit 2be0d7b into godotengine:master Jul 7, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Jul 7, 2025

Thanks! Congratulations on your first merged contribution! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants