What's the fastest possible way to save an image to a file?

83 views
Skip to first unread message

Duke Dougal

unread,
Nov 23, 2022, 4:59:10 PM11/23/22
to skia-discuss
I have some code that outputs images using Skia.

My primary concern, above all else, is speed.

And I have found that encoding is extremely costly in terms of time.

jpeg is quite fast, but my images have an alpha channel, so only webp and png are suitable for me.

But webp and PNG are very, very slow to encode.

So I wonder, is there some way to dump image data to a file, BEFORE any encoding is done?  Then, I can have another process that is not time critical go through and convert the dumped image data to some destination format.

I've had a good read through the documentation but it's not entire clear to me if my goal is practical of somehow getting the data "before it is encoded" and saving it to disk.

Any advice valued thankyou.

thanks

Reply all
Reply to author
Forward
0 new messages