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

Add blurHashPainter composable #2585

Merged

Conversation

nielsvanvelzen
Copy link
Member

Changes

  • Add a blurHashPainter composable function to create a painter for blur hashes. This allows the use of the blur hash in the Image composable or other composables that use a painter.

I've added this function to the AsyncImage file because eventually AsyncImage will use it.

Issues

@nielsvanvelzen nielsvanvelzen added the enhancement New feature or request label Mar 11, 2023
@nielsvanvelzen nielsvanvelzen added this to the v0.16.0 milestone Mar 11, 2023
Image(
bitmap = imageBlurHashBitmap,
painter = blurHashPainter(imageBlurHash, IntSize(32, 32)),

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers.

This expression contains a magic number. Consider defining it to a well named constant.
Image(
bitmap = imageBlurHashBitmap,
painter = blurHashPainter(imageBlurHash, IntSize(32, 32)),

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers.

This expression contains a magic number. Consider defining it to a well named constant.
@nielsvanvelzen nielsvanvelzen merged commit 5d29a29 into jellyfin:master Mar 12, 2023
@nielsvanvelzen nielsvanvelzen deleted the compose-blur-hash-painter branch March 12, 2023 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant