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

How to make GSprite from Uint8List Image #68

Open
app-chain-hagio opened this issue Apr 4, 2024 · 2 comments
Open

How to make GSprite from Uint8List Image #68

app-chain-hagio opened this issue Apr 4, 2024 · 2 comments

Comments

@app-chain-hagio
Copy link

app-chain-hagio commented Apr 4, 2024

Sorry for the beginner's question.
How to make GSprite from Uint8List Image?

@app-chain-hagio app-chain-hagio changed the title How to make GSprite from Uint8LIst Image How to make GSprite from Uint8List Image Apr 4, 2024
@roipeker
Copy link
Owner

roipeker commented Apr 4, 2024

Well, a GSprite is mostly a "container" to add other display objects but has a graphics property to draw things in it as well.
If you wanna display an Image (from the bytes) is more performant an easier to use a GBitmap (which is a display object as well) and add it as child of a Gsprite,
Another approach is using the Image as a "fill" for drawing, with a GShape or a GSprite, and access the graphics.beginBitmapFill.
I will try to post an example later here for you, but dig into the examples source codes in the meantime to see how to render images with graphx

@app-chain-hagio
Copy link
Author

Thank you.  I should have told you first. So, I want to use a flutter screenshot (Uinit8List) as a background.

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

2 participants