microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.27k stars 674 forks source link

Proposal: Automatically generate all needed file sizes #3045

Open mrlacey opened 4 years ago

mrlacey commented 4 years ago

Proposal: Automatically generate all needed images from one source

Summary

Where multiple images are needed for store assets, splash screens, tiles, etc. it would be great if the project only needed one (source) image and would automatically generate all the different needed ones from that.

Rationale

Scope

Capability Priority
This proposal will allow developers to only need to provide a single image in their project Must
This proposal will allow end users to use a single or multiple issues if they wish Must
This proposal will allow end users to use vector based images (covered by https://github.com/microsoft/microsoft-ui-xaml/issues/3561) Won't

Important Notes

Open Questions

StephenLPeters commented 4 years ago

@fabiant3 fyi

robloo commented 4 years ago

How would this be different from the asset generator built into visual studio for UWP apps? (Package > Visual Assets > Asset Generator) I always just specify an SVG and have it generate all the required sizes. This was added to solve this specific problem as far as I recall.

maxkatz6 commented 4 years ago

Must be related https://github.com/microsoft/ProjectReunion/issues/132

mrlacey commented 4 years ago

How would this be different from the asset generator built into visual studio for UWP apps? (Package > Visual Assets > Asset Generator) I always just specify an SVG and have it generate all the required sizes. This was added to solve this specific problem as far as I recall.

The current asset generator creates all the files so they exist on disk and are part of the project. MAUI/Resizetizer only generates them at build time. This keeps the project smaller and means that any new file sizes that are needed in the future can be created automatically.

robloo commented 4 years ago

Generating at build time -- or even better just using an SVG in the package -- sounds like a great idea.

JeanRoca commented 3 years ago

This looks like an issue for Project Reunion. Closing as this seems a dupe of https://github.com/microsoft/ProjectReunion/issues/132 I'll be happy to reopen if that is not the case.

mrlacey commented 3 years ago

This looks like an issue for Project Reunion. Closing as this seems a dupe of https://github.com/microsoft/ProjectReunion/issues/132 I'll be happy to reopen if that is not the case.

That issue has been moved to this repo as it directly relates to WinUI. By closing this in favor of #3561, does that mean you're confirming support for SVG is coming? The linked issue says it is dependent upon other work in the shell but there is no public indication that this is coming.

Even if SVG support was added, SVGs may not be appropriate for all images. Suggesting that support for the use of SVGs means this isn't relevant implies that WinUI will be switching to exclusively using SVGs. Is this the case?

Not doing this means more work for developers using WinUI3 and ignoring related, similar advances in MAUI that are designed to make development easier.

JeanRoca commented 3 years ago

This looks like an issue for Project Reunion. Closing as this seems a dupe of https://github.com/microsoft/ProjectReunion/issues/132 I'll be happy to reopen if that is not the case.

That issue has been moved to this repo as it directly relates to WinUI. By closing this in favor of #3561, does that mean you're confirming support for SVG is coming? The linked issue says it is dependent upon other work in the shell but there is no public indication that this is coming.

Even if SVG support was added, SVGs may not be appropriate for all images. Suggesting that support for the use of SVGs means this isn't relevant implies that WinUI will be switching to exclusively using SVGs. Is this the case?

Not doing this means more work for developers using WinUI3 and ignoring related, similar advances in MAUI that are designed to make development easier.

I will go ahead and leave the issue open as it seems this one does not exclusively limit images to SVG as the other issue does. Unfortunately, we are unable to commit to this work right now and would have to look into it after WinUI 3.0. It seems more people are in favor of SVG support from the previous issue. I am curious to know if SVG support would work for your particular use case? If not, could you provide some more insight as to why?