Skip to content

[resources] Add image bitmap/xml/svg bytearray converters to the corresponding source sets.#5098

Merged
Konstantin (terrakok) merged 2 commits into
masterfrom
k.tskh/img-decoders
Jul 26, 2024
Merged

[resources] Add image bitmap/xml/svg bytearray converters to the corresponding source sets.#5098
Konstantin (terrakok) merged 2 commits into
masterfrom
k.tskh/img-decoders

Conversation

@terrakok

@terrakok Konstantin (terrakok) commented Jul 12, 2024

Copy link
Copy Markdown
Member

The PR adds methods to convert a bitmap bytearray to the ImageBitmap and a vector XML content bytearray to the ImageVector in the common code. And the same for an SVG files on non-android targets.

Fixes https://youtrack.jetbrains.com/issue/CMP-3869
Fixes https://youtrack.jetbrains.com/issue/CMP-4925

Release Notes

Features - Resources

  • Added utility functions to decode Bitmap ByteArray as ImageVector and XML ByteArray as ImageVector in the common code and SVG ByteArray as Painter in the non-android code

@igordmn

Copy link
Copy Markdown
Collaborator

Fixes #3869
Fixes #4925

It doesn't fix it completely, until https://android-review.googlesource.com/c/platform/frameworks/support/+/3174259 is merged. Let's change to "Partially fixes"

@terrakok

Copy link
Copy Markdown
Member Author

Maybe we can add the method to the library at the moment? And deprecate it when the platform implementation is merged

@igordmn

Igor Demin (igordmn) commented Jul 23, 2024

Copy link
Copy Markdown
Collaborator

Maybe we can add the method to the library at the moment? And deprecate it when the platform implementation is merged

Looks good to me, let's do this way

@terrakok Konstantin (terrakok) changed the title [resources] Add image xml/svg bytearray converters to the corresponding source sets. [resources] Add image bitmap/xml/svg bytearray converters to the corresponding source sets. Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants