Skip to content

Unable to load image #1808

Answered by hajimehoshi
EldersJavas asked this question in Q&A
Sep 12, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote
	tmp, _, _ :=image.Decode(file)
	if err != nil {
		log.Fatal(err)
	}

You should get an error from Decode. Then

	tmp, _, err :=image.Decode(file)
	if err != nil {
		log.Fatal(err)
	}

is the correct code.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@EldersJavas
Comment options

@hajimehoshi
Comment options

Answer selected by EldersJavas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1807 on September 12, 2021 05:33.