Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C Implementation doesn't produce "best looking" blurhash #101

Open
hannojg opened this issue Jan 13, 2021 · 2 comments
Open

C Implementation doesn't produce "best looking" blurhash #101

hannojg opened this issue Jan 13, 2021 · 2 comments
Labels
C question Further information is requested TypeScript

Comments

@hannojg
Copy link

hannojg commented Jan 13, 2021

I have just compared the blurhash TypeScript module and the C module (I was about to write a blurhash node module based on the C implementation for performance).
The two blurhashes from the modules look different:

C Implementation TS implementation (better)
Screenshot 2021-01-13 at 08 40 33 Screenshot 2021-01-13 at 08 39 23
Has a dark spot in the top left corner matches the image really well
LTEfiu4UEe-p0M-oxuRQnhtkRQR* UEE:Ct005i~C00^%%MIUr;%yMyNG^R9uRP%M

The original image used, with x: 4, y: 3 components:
The original image used

Can someone explain the difference? Shouldn't the both modules create (nearly) the same output?
I think that the result from the TS implementation looks better and the result from the C module should match this.

@Wunkolo
Copy link

Wunkolo commented Mar 16, 2021

Just a guess, but something tells me it either has to do with sRGB<->Linear color-space conversions or an issue with image addressing causing it to alias the color samples differently.

@windrunner414
Copy link

windrunner414 commented Aug 19, 2021

typescript generate a larger hash(28 vs 36), it's strange

@jerry-git jerry-git added TypeScript C question Further information is requested labels Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C question Further information is requested TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants