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

SVG Support With image() #21

Open
DogeDark opened this issue Apr 4, 2024 · 2 comments
Open

SVG Support With image() #21

DogeDark opened this issue Apr 4, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@DogeDark
Copy link
Member

DogeDark commented Apr 4, 2024

Specific Demand

The capability to use SVG images with the image() function in manganis:

const DIOXUS_LOGO: manganis::ImageAsset = manganis::mg!(image("./assets/dioxus_color.svg"));
// instead of
const DIOXUS_LOGO: &str = manganis::mg!(file("./assets/dioxus_color.svg"));

While it works with file(), one could assume to use image() and end up confused like me.

@ealmloff ealmloff added the enhancement New feature or request label Apr 5, 2024
@rambip
Copy link
Contributor

rambip commented Apr 12, 2024

What if the library gave an error like "the mg!(image(...)) macro can only be used for matrix images. Svg is a vector image, so use mg!(file()) instead" ?

@ealmloff
Copy link
Member

There are cases where treating svgs as images is nice. Images contain options for low quality image previews which would be nice to support for svgs as well with something like this

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

No branches or pull requests

3 participants