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

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

Merged
merged 2 commits into from
Jul 26, 2024

Conversation

terrakok
Copy link
Collaborator

@terrakok terrakok commented Jul 12, 2024

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

@terrakok terrakok requested a review from igordmn July 12, 2024 15:48
@igordmn
Copy link
Collaborator

igordmn commented Jul 18, 2024

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
Collaborator Author

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

@igordmn
Copy link
Collaborator

igordmn commented Jul 23, 2024

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 terrakok requested a review from igordmn July 23, 2024 12:50
@igordmn igordmn requested a review from MatkovIvan July 23, 2024 12:51
@terrakok 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
@terrakok terrakok merged commit 21a89d9 into master Jul 26, 2024
@terrakok terrakok deleted the k.tskh/img-decoders branch July 26, 2024 10:54
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.

None yet

3 participants