We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The current conversion code for bitmaps and canvas elements to Tile ImageResources, uses RGB_565.
horologist/tiles/src/main/java/com/google/android/horologist/tiles/images/images.kt
Line 69 in 40801e6
This is safe format, but requires extra work and also does not support alpha channel.
We should add a flag to support other formats including png, webp.
This probably involves removing hard coded format when flag is set
setFormat(ResourceBuilders.IMAGE_FORMAT_RGB_565)
and use, or other conversion code.
val bytes = ByteArrayOutputStream().apply { compress(Bitmap.CompressFormat.PNG, 100, this) }.toByteArray()
We can assume Coil for our conversion code if it helps, and to start with avoiding conversions, but to be confirmed.
A later change might be also this code path https://github.com/google/horologist/blob/2f15272f92291bcdbdacd66b1042e42802c45cb7/tiles/src/main/java/com/google/android/horologist/tiles/canvas/canvas.kt
The text was updated successfully, but these errors were encountered:
cc @ataulm
Sorry, something went wrong.
We should make this a flag, useRgb565?
Current logic when useRgb565.
When not useRgb565, remove setFormat, and pass through the existing bytes. Tile rendering should ask the system to decode.
Samples should show a png, webp or jpg working without conversion.
I think for a "good first issue" this needs more context:
No branches or pull requests
The current conversion code for bitmaps and canvas elements to Tile ImageResources, uses RGB_565.
horologist/tiles/src/main/java/com/google/android/horologist/tiles/images/images.kt
Line 69 in 40801e6
This is safe format, but requires extra work and also does not support alpha channel.
We should add a flag to support other formats including png, webp.
This probably involves removing hard coded format when flag is set
and use, or other conversion code.
We can assume Coil for our conversion code if it helps, and to start with avoiding conversions, but to be confirmed.
A later change might be also this code path https://github.com/google/horologist/blob/2f15272f92291bcdbdacd66b1042e42802c45cb7/tiles/src/main/java/com/google/android/horologist/tiles/canvas/canvas.kt
The text was updated successfully, but these errors were encountered: