This page mentions `decodeToImageVector` being add...
# compose-desktop
b
This page mentions
decodeToImageVector
being added in 1.7.3, but I can't seem to find it (im using 1.8.2, and i do see ``decodeToImageBitmap``), do i need to add a specific library for it to become available? edit: the page: https://kotlinlang.org/docs/multiplatform/whats-new-compose-170.html#functions-for-converting-byte-arrays-into-imagebitmap-or-imagevector
k
What exactly do you want to do? Could you share an example?
a
It’s in the new resources library, so you need to add
Copy code
implementation(compose.components.resources)
to use it.
b
Oh I thought it would be in the same place as
decodeToImageBitmap
which I was using because I hadn't switched to the new resources library yet...
well I found it, and it seems to be loading the resource, but it doesn't seem to be able to render the vector drawable at all. there are no errors but it doesn't display anything (blank space)
k
b
i followed those directions
should the compose preview work? it's also blank
i tried with a png, and it works fine, but the xml is blank, even if i use the library's
painterResource(Res.drawable....)
k
I'm sure your XML is invalid. Check the doc
b
i had downloaded a file from that link, changed the color to
#000000
and deleted the
android:tint
line, exactly as that doc said
it looks like the downloaded icon from that fonts.google.com/icons link has
android:color=
instead of
android:fillColor=
well now the ones im downloading have the correct
fillColor
, so maybe I deleted and re-added the attribute wrong, either way it's working now