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
It depends a bit on taste. The more components you pick, the more information is retained in the placeholder, but the longer the BlurHash string will be. Also, it doesn't always look good with too many components. We usually go with 4 by 3, which seems to strike a nice balance.
However, you should adjust the number of components depending on the aspect ratio of your images. For instance, very wide images should have more X components and fewer Y components.
The Swift example project contains a test app where you can play around with the parameters and see the results.
Did anybody come up with a simple formula we can use to come up with proper X and Y components dynamically based on width/height?
The text was updated successfully, but these errors were encountered:
I think the ideal way to automatically pick a good X and Y component will be based on the total number of components that contribute to the image and not the aspect ratio. Because aspect ratio has no info on the amount of details present in the image.
The issue involved is the fact they don't want to do the entire computation for all components in an image before making a good selection of components. It's expensive to compute for components you'll end up discarding.
According to the documentation:
Did anybody come up with a simple formula we can use to come up with proper X and Y components dynamically based on width/height?
The text was updated successfully, but these errors were encountered: