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

feat: add base64 image encoding #481

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

EscapedGibbon
Copy link
Collaborator

close: #476

@EscapedGibbon EscapedGibbon linked an issue Feb 25, 2025 that may be closed by this pull request
Copy link

codecov bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.48%. Comparing base (bd5cc06) to head (5d3ba91).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #481   +/-   ##
=======================================
  Coverage   98.48%   98.48%           
=======================================
  Files         243      244    +1     
  Lines       10016    10029   +13     
  Branches     2144     2146    +2     
=======================================
+ Hits         9864     9877   +13     
  Misses        152      152           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@EscapedGibbon EscapedGibbon force-pushed the 476-imagetodataurl-is-missing branch from 05c6eab to 8a3792f Compare February 25, 2025 11:00
@EscapedGibbon EscapedGibbon force-pushed the 476-imagetodataurl-is-missing branch from 6f21b2e to 5d3ba91 Compare February 25, 2025 11:26
@EscapedGibbon
Copy link
Collaborator Author

CleanShot 2025-02-25 at 15 51 23

However, Buffer.from() cannot be used in browser and TextDecoder is unstable and doesn't work for Node18 and Node20.

@targos
Copy link
Member

targos commented Feb 25, 2025

Can you compare with https://www.npmjs.com/package/@jsonjoy.com/base64 which claims to be compatible with node and browsers.

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.

image.toDataURL() is missing
2 participants