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

Drawing with Jetpack Desktop #42

Open
Solido opened this issue Nov 6, 2020 · 2 comments
Open

Drawing with Jetpack Desktop #42

Solido opened this issue Nov 6, 2020 · 2 comments

Comments

@Solido
Copy link
Contributor

Solido commented Nov 6, 2020

Hi !

Trying to move some code to Jetpack Desktop :)

Making a snapshot from Surface.makeRasterN32Premul get me the right color result as I export to file
Using this same snapshot got me grayscale image when displayed with

Canvas(
                    modifier = Modifier.fillMaxSize()
                ) {
                    drawIntoCanvas { canvas ->
                        canvas.nativeCanvas.drawImage(loaded.value, 0f, 0f)
                    }
                }

Seems strange. do I've to reencode bytes ???

Thanks !

@tonsky
Copy link
Collaborator

tonsky commented Nov 6, 2020

Very weird — do you have a code example I can run?

@Solido
Copy link
Contributor Author

Solido commented Nov 6, 2020

Got to write one from scratch.
Jet Desk examples use BufferedImage encoded with ImageIO only

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