DjDeveloperr / skia_canvas

Fast HTML Canvas API implementation for Deno using Google Skia
https://deno.land/x/skia_canvas
Apache License 2.0
124 stars 7 forks source link

feat: `readable()` in additon to `save()` #27

Closed shevernitskiy closed 1 year ago

shevernitskiy commented 1 year ago

Is this possible to get ReadableStream instead of saving to the file or saving to the Buffer?

DjDeveloperr commented 1 year ago

There isn’t any direct API to do that, but maybe we’ll be able to offload encoding to a different thread and make encode async at least. Streaming is probably not possible due to the nature of API skia exposes for encoding.

shevernitskiy commented 1 year ago

Thanks for the answer.

DjDeveloperr commented 1 year ago

It's still desirable to have async encoding so I've opened a separate issue: #28