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

Change Uncompress ImageData to DataURL #67

Merged
merged 2 commits into from Feb 26, 2022
Merged

Conversation

kapong
Copy link
Contributor

@kapong kapong commented Jan 24, 2022

I reduce sending data from ImageData to DataURL. It's very compact and faster to transfer information when the canvas is large.

for example, I reduce from 7MB to 74kB with the same canvas size

image

@andfanilo
Copy link
Owner

Oh this is awesome! Have you had the chance to try it in a Cloud environment like Streamlit Sharing or Heroku, to see the data URL can be fetched correctly? (it should, but just to be sure)

@kapong
Copy link
Contributor Author

kapong commented Jan 24, 2022

@andfanilo, I just test on my own docker. But i think it will be ok because it's not required additional library to solve the dataurl.

@kapong
Copy link
Contributor Author

kapong commented Jan 26, 2022

Additional, I change backgroudImage from UInt8Array to URL using Streamlit in-mem filemanager. It's make everything faster.

I'm sorry about my English but I think you should try it you self to understand what i meant.

@andfanilo
Copy link
Owner

Yes I will test it, sorry I'm still giving lectures at university so I'll try to have a look next week :)

@andfanilo andfanilo merged commit 0e4147e into andfanilo:develop Feb 26, 2022
@andfanilo
Copy link
Owner

Hi @kapong

Finally got time to review your change and finally understood the gist of the code. Thanks for the contribution :) I'll do a release around this week, probably with a small video with the features in there. I'll probably thank you with your github username in the video except if you don't want to!

Have a nice day,
Fanilo

@kapong
Copy link
Contributor Author

kapong commented Feb 26, 2022 via email

andfanilo pushed a commit that referenced this pull request Sep 8, 2022
* Change Uncompress ImageData to DataURL

* Use backgroundImage with Streamlit in-mem filemanager
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

Successfully merging this pull request may close these issues.

None yet

2 participants