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.
I am trying to create blurhash, so I use this package like this
Where
savePathis 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.