ChrisTitusTech / winutil

Chris Titus Tech's Windows Utility - Install Programs, Tweaks, Fixes, and Updates
MIT License
20.74k stars 1.29k forks source link

incode SVG instead of webrequest +PNGs #2459

Closed MyDrift-user closed 4 weeks ago

MyDrift-user commented 1 month ago

Is your feature request related to a problem? Please describe. Not really a problem but could minimize webrequests for images and remove the need of locally saving images used in the utility. I shortly talked about this with @og-mrk and @Marterich, but changed some details to the logics of solution 2.

Describe the solution you'd like Using SVGs with them embetted in the code of the utility, use them where possible and converting them to needed filetype. This is not as easy as one might think, because .net does not officially support SVGs.

Solution 1: "Library" We could use a library that let's us use the svg in the utility, which would add a dependency and delay first start of the utility but would let use them. We would still have to convert the svg into another image format or make a webrequest for the shortcut.

Solution 2: "Convertion to Bitmap" (the better, but harder one Ig) I have the checkmark.png and warning.png in svg format, filesize for both together is around 1 kilobyte. We could work on a simplified logo for chris without a complicated shadow in svg format. Those could be saved in the utility and converted into a bitmap string saved into a variable. This bitmap string can be used almost everywhere exept for the shortcut icon, which would need an additional convertion into a .ico file that needs to be saved to the disk.

Additional context I did not yet find out how to convert svg to bitmap using powershell without a 3rd party tool. This is why I am making this issue so early and kind of asking for help on that.

og-mrk commented 1 month ago

Cool idea @MyDrift-user, if it get passed on & implemented, it'd be nice to edit these SVG files rather then hard-coded stroke paths (and other data) in some text file. It can be done by adding a new step in Compilation, which copies the contents of SVG Files, and pasts them inside final compiled winutil.ps1 file.

In general, I do like this idea.

EDIT: Noticed what I've said is pretty much explained in Solution 2, my bad 😆

github-actions[bot] commented 1 month ago

This issue was marked as stale because it has been inactive for 7 days

github-actions[bot] commented 4 weeks ago

This issue was closed because it has been inactive for 7 days since it was marked as stale