Skip to content

Encoding takes extremely long time #29

@FluffyDiscord

Description

@FluffyDiscord

I am trying to create blurhash, so I use this package like this

blurHash = await BlurhashFFI.encode(FileImage(File(savePath)));

Where savePath is locally stored file on my device app cache folder (path_provider). Passing image of 3000x4000 from my camera while the app runs on my S23 Ultra takes several seconds (around 10s) to process the blurhash.

Is this expected to take so long?

From your code that I can see, you are basically reading all image bytes. Wouldn't it be efficient to simply read the few points/bytes you need to actually create the blurhash? This is definitely linked to #16 because you load everything in memory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions