Skip to content

How do convert the decoded result to a base64 encoded image? #23

@dessalines

Description

@dessalines

I'd like to use this to serve base64 encoded image strings to a front end, but unfortunately its not clear how to do so.

This isn't working (maybe because the raw bytes don't produce an image?)

let decoded = blurhash::decode(blurhash, self.width.into(), self.height.into(), 1.0);
decoded.map(|data| general_purpose::STANDARD.encode(&data));

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions