Comments (14)
@pictos for the assets path, the uno assets tooling handles casing properly (there's a generator for that specifically). We should be able to remove that restriction for UnoImage
at least. Other types like app icon and splashscreen will need to stay lowercased.
from uno.resizetizer.
We should never be using \
in image paths. Short-hand paths are just short hand to full URIs, let's not confuse users with a different convention.
from uno.resizetizer.
Add a troubleshot section and add this info
from uno.resizetizer.
@pictos FYI I added another point to the list after seeing some feedback for another project
Related : UnoImage - Image Width="300" Height="300" Source="Assets\Images\myImage.png"
The source path is incorrect here, should be
<Image Width="300" Height="300" Source="ms-appx:///NameOfTheApp/Assets/Images/nameoftheasset.png"
And can we add a proper example in the sample solution also please
@jeromelaban I would like to have your feedback on the fact that right now Uno.Resizetizer is forcing lowercase for the svg file name and png name in the path. I asked @pictos to specify this info inside the documentation for the moment, but wondering if we cannot just do something about this directly in Resizetizer instead of forcing the lowercase?
Related: UnoImage - One or more invalid file names were detected. File names must be lowercase, start and end with a letter character, and contain only alphanumeric characters or underscores
These details should be mentioned in the documentation also
from uno.resizetizer.
@agneszitte-nventive android, for example, has restrictions on assets for app icons, it should be lowercase. In order to avoid confusion on our users we lowered down to the commun denominator of all platforms. That way we can make sure, with less effort, that assets will follow all the platform requirements.
So in resume, this isn't a limitation of resizetizer but a limitation on targets platforms that we have to respect.
from uno.resizetizer.
@pictos for the assets path, the uno assets tooling handles casing properly (there's a generator for that specifically). We should be able to remove that restriction for
UnoImage
at least. Other types like app icon and splashscreen will need to stay lowercased.
I agree @jeromelaban , that way we can have the proper error message only for icon/splashscreen.
@pictos you will be able to adjust the doc to have the info for the icon/splascreen section only when this will be adjusted in Resizetizer
from uno.resizetizer.
I would say that's a bad approach, having different rules for different build actions. Right now is just one, but it opens precedence for other changes like that in the future. IMHO is better/easier to educate devs right now that in order to use Resizetizer, they should provide lowercase names separated by _
, instead of creating different rules for different build actions inside the same tool.
from uno.resizetizer.
I would say that's a bad approach, having different rules for different build actions. Right now is just one, but it opens precedence for other changes like that in the future. IMHO is better/easier to educate devs right now that in order to use Resizetizer, they should provide lowercase names separated by
_
, instead of creating different rules for different build actions inside the same tool.
@pictos but in my opinion, devs were already used to having different rules for app icons and splashscreen on all the different platforms. Now it is simpler while using Resizetizer, it just needs to be properly documented and keep the error message when needed.
We are used to having upper/lower case for the Images inside the app, so it will be easier for a project already in place to start using Resizetizer as for UnoImages, the only change needed will be in the solution explorer to replace the png with an svg without changing the XAML at all (as the path will be the same and the name of the asset also).
(cc @jeromelaban)
from uno.resizetizer.
My 2 cents on the file name casing:
as a dev I don't mind having to make the file names dash-separated and lower-case, the error tells you pretty well what you have to do.
Make an aka-URL with the explanation of the rational behind the rule would a good addon, my first thought was "why on earth in 2023 the case of a file becomes a problem?". Knowing the reason can help to accept the limitation 😄
from uno.resizetizer.
Since the Resizetizer works only with vector images (only svg?), I would add an error when the UnoImage ItemGroup
e.g. matches non-SVG files.
Or there is another benefit in having UnoImage as DeployAction for (e.g.) PNGs ? Is such a case, is it documented?
from uno.resizetizer.
@igiona Sorry for the late reply, it's very rush here hehe.
So you can use png files as well, they will be processed but will not be resized.
from uno.resizetizer.
@pictos for the assets path, the uno assets tooling handles casing properly (there's a generator for that specifically). We should be able to remove that restriction for
UnoImage
at least. Other types like app icon and splashscreen will need to stay lowercased.
Is this tracked? It seems that the lowercase is still required for UnoImage
, so I wanted to check if a new issue needs to be created @pictos
from uno.resizetizer.
@MartinZikmund if I can remember we'll that restriction will be there, because of Android and here we try to handle the minimum common operator. And this limitation shouldn't be a blocker for any dev using Uno
from uno.resizetizer.
@pictos but normal pngs do not have this limitation even in case of Android 🤔, I would expect that because Resizetizer produces scaled pngs, it should ultimately be "equivalent" to just including scaled pngs directly, or am I missing something 👀?
from uno.resizetizer.
Related Issues (20)
- Support for Android Vector Assets
- Allow using `.svg` for WASM splash screen directly
- [Docs] Single project usage HOT 6
- [Docs] Platform-specific customization HOT 4
- [Doc] Add explanation of `Svg` folders in README or `SharedAssets.md` HOT 5
- Resizetizer does not run properly when PROCESSOR_ARCHITECTURE is x86 HOT 1
- Changing `.svg` file build action to `Content` causes error HOT 1
- [Epic] Resizetizer Documentation Improvements HOT 1
- [WinAppSDK] Resizetizer should not set Window title HOT 5
- [WinAppSDK Packaged] Taskbar icon and app icon are not set HOT 4
- Generated appxmanifest does not properly set properties
- Build error introduced with 257
- [Linux] The selected runtime directory does not exist
- Package.appxmanifest does not have update for Publisher
- UnoAppManifest should be be overrwritten if not changed
- [Uno.Resizetizer] Add support for qualifiers in filename
- Why resizetizer adds margin to all icons for Windows? HOT 4
- [macos] Appxmanifest copy failure
- Default uno template contains icon errors HOT 2
- The Uno.Resizetizer extension for icon should be conditionally generated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uno.resizetizer.