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

Output PNG base64 when decode image path is - #47

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Thearas
Copy link

@Thearas Thearas commented Mar 7, 2024

So we can get data url quickly:

local hash=$(thumbhash encode "$img" | awk -F ': ' '{print $NF}' | xargs thumbhash decode - | awk -F ': ' '{print $NF}')
echo "data:image/png;base64,$hash"

@Thearas
Copy link
Author

Thearas commented Mar 7, 2024

PTAL @Astropilot

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.

1 participant