Closed shiffman closed 4 years ago
@shiffman - I'm def not an expert in this, but as a simple implementation this makes sense.
One thing worth looking into is maybe the https://www.electronjs.org/docs/api/native-image electron Native Image object? Maybe this helps simplify things and also reduces the need for loading images on both server and client?
Ah this is a great idea, I will definitely take a look, thank you for sharing!!
I think what you can do then is send the jpg or png image to the renderer with the .toPNG()
function https://www.electronjs.org/docs/api/native-image#imagetopngoptions
native-image worked great!
@shiffman YESSS DANNNNNN
This is not complete but we could merge it in for continued work. To do's off the top of my head are:
I won't be able to return to this until tomorrow so we can merge if anyone else wants to pick up where I left off.
@shiffman - let's merge in and we can work from where you've left off. I think I can resolve at least auto-detect canvas size (currently hard-coded)
Great, just fixed a merge conflict let me make sure it still works and I will merge.
Ok, merging!
🙏
Quick question before I keep going? Would I be better served by loading the image files from the client itself or is my methodology of loading using
fs
and sending as base64 via a message sound?