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

Export to PNG/JPG file #5

Open
EdnaldoNeimeg opened this issue May 5, 2021 · 4 comments
Open

Export to PNG/JPG file #5

EdnaldoNeimeg opened this issue May 5, 2021 · 4 comments

Comments

@EdnaldoNeimeg
Copy link

EdnaldoNeimeg commented May 5, 2021

Is there any method to export scene to PNG (transparent) or JPG image?

@drawcall
Copy link
Member

drawcall commented May 6, 2021

Oh, what is your purpose? Convert animation to png?

@EdnaldoNeimeg
Copy link
Author

EdnaldoNeimeg commented May 6, 2021

@drawcall
Take a look at http://fabricjs.com/
It was made with Javascript but it's quite similar to Zerker, I've used it to build https://estudio3d.vercel.app/ as you can see below
ezgif-3-2adb81e85f1f
After editing on the left I export the scene to PNG and use it on the right

@drawcall
Copy link
Member

drawcall commented May 7, 2021

Oh, this question is difficult. Because the screenshot requires the following code

final recorder = ui.PictureRecorder();
final canvas = Canvas(recorder, canvasRect);
...
final picture = recorder.endRecording();

But the canvas in Zerker is non-display declaration, there is no way to get or transfer the recorder. https://github.com/flutterkit/zerker/blob/master/lib/src/zerkerwidget.dart#L182

@drawcall
Copy link
Member

drawcall commented May 7, 2021

We can submit an issue to flutter and set the_recorder in Canvas as a public property

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