You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Image quantization may take a significant amount of time (especially for high resolution images).
The #129 improves things a bit, but it just improving the UI responsiveness by moving the extraction of the dominant colors of the image form the main thread to web worker. It does not speed up the process per se.
BTW, it seems using WASM (see #99) or GLSL or WGSL (see #128) could improve the performance dramatically.
Another way to improve performance of image quantization is to lower the resolution of the input image.
I could prepare a pull request if you are interested, but though only for TypeScript implementation. 😉
Obviously, implementations in other languages don't use browser canvas like the TypeScript implementation does. So I think we should use the second approach with pixel skipping. Right?
But first it would be nice to fix the #132 bug to prove that lowering the resolution of the input image doesn't affect the result.
Image quantization may take a significant amount of time (especially for high resolution images).
The #129 improves things a bit, but it just improving the UI responsiveness by moving the extraction of the dominant colors of the image form the main thread to web worker. It does not speed up the process per se.
BTW, it seems using WASM (see #99) or GLSL or WGSL (see #128) could improve the performance dramatically.
Another way to improve performance of image quantization is to lower the resolution of the input image.
I see this as the second
quality
argument of thesourceColorFromImage
function (as is done in thecolor-thief
— https://lokeshdhakar.com/projects/color-thief/#api)material-color-utilities/typescript/utils/image_utils.ts
Lines 29 to 79 in f5d03da
This can be implemented in two ways:
This should also fix the #130 bug.
The text was updated successfully, but these errors were encountered: