Generating bitmap server-side (dotnet)

37 views
Skip to first unread message

Michal Kaczmarek

unread,
Jul 6, 2018, 10:07:01 AM7/6/18
to Literally Canvas

Hi,
Has anyone tried generating png image from LiterallyCanvas' snapshot in dotnet?
My client is generating a lot of documents containing a lot of drawings. I create PDFs of them on the server and have to store both bitmaps and JSON snapshots because I can generate the bitmap only in javascript. I didn't realize how quickly it will fill up the server and have to figure out a way to avoid storing the bitmaps in the database.

Any suggestions will be appreciated.



Steve Johnson

unread,
Jul 7, 2018, 9:49:55 PM7/7/18
to literal...@googlegroups.com
The basic problem you'll face when trying to do this is that you need to reimplement all of the code in the "renderer" as C# or whatever.


It would be straightforward for someone comfortable with figuring out random JSON blobs and using drawing APIs. But you'd also inevitably have rendering bugs since you wouldn't match the JS implementation pixel for pixel, and if we add new shapes, you'd have to write new code.

IMO you're probably better off storing the images in S3 or something. Storage of images in web apps is basically a solved problem these days, without resorting to compression gymnastics like this. :-)
--
You received this message because you are subscribed to the Google Groups "Literally Canvas" group.
To unsubscribe from this group and stop receiving emails from it, send an email to literallycanv...@googlegroups.com.
To post to this group, send email to literal...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages