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

LoadTextureFromImage seems to be expecting an odd type #192

Closed
drum445 opened this issue Aug 9, 2022 · 1 comment
Closed

LoadTextureFromImage seems to be expecting an odd type #192

drum445 opened this issue Aug 9, 2022 · 1 comment

Comments

@drum445
Copy link

drum445 commented Aug 9, 2022

I may just be doing something wrong, but the following code is throwing this error:

cannot use image (variable of type image.Image) as type *rl.Image in argument to rl.LoadTextureFromImage

Sample code:

f, err := os.Open("res/myfile.png")
image, _, err := image.Decode(f)
tmp := rl.LoadTextureFromImage(image)

Many Thanks

@drum445 drum445 closed this as completed Aug 9, 2022
@drum445
Copy link
Author

drum445 commented Aug 9, 2022

Sorry, rl.NewImageFromImage was the missing piece of the puzzle

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

No branches or pull requests

1 participant