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
Unfortunately this involves creating a huge array with all pixels and this is quite slow.
Do you think there is a way to have a more efficient implementation using Vips directly? I would be happy to have pointers, I am not really familiar with the low-level VIPS functions and if they can be used for this to avoid doing the computation using Ruby.
@Nakilon Thanks for the suggestion, I am already doing a resize before calculating the blurhash to reduce the number of ruby allocations, but I think it can be even faster and memory-efficient :)
@jcupitt Ok, I was not sure it could be done, if vips gets primitives to do this it would be awesome!
Activity
Nakilon commentedon May 10, 2020
While it's still not the "using Vips directly", try resizing the image to 100x100 and see if it works enough well for you:
jcupitt commentedon May 11, 2020
I think the DCT would probably need to be implemented in C or C++. Let's tag this as an enhacement.
jcupitt commentedon May 11, 2020
... an enhancement on libvips, I mean
renchap commentedon May 11, 2020
@Nakilon Thanks for the suggestion, I am already doing a resize before calculating the blurhash to reduce the number of ruby allocations, but I think it can be even faster and memory-efficient :)
@jcupitt Ok, I was not sure it could be done, if vips gets primitives to do this it would be awesome!