Problems with images
Posted: 10 Mar 2015, 09:33
1. If I try to use a PNG image in my project I receive the following error:
2. If I convert the image to JPG then it works.
3. If I hardcode the path to the JPG image in XAML then it loads properly:
4. If I use binding instead with the exact same path specified in code-behind then it doesn't work:
Code: Select all
[gl] Assets/GUI/Common/Workflow/Resources/senil_prepare.png
Image format not supported
UnityEngine.Debug:LogError(Object)
Noesis.BuildToolKernel:OnLog(Int32, String) (at Assets/Editor/NoesisGUI/NoesisBuildToolKernel.cs:260)
System.Object:wrapper_native_0x36d1a3f0(String)
Noesis.BuildToolKernel:BuildIncremental() (at Assets/Editor/NoesisGUI/NoesisBuildToolKernel.cs:116)
NoesisPostProcessor:Build(String) (at Assets/Editor/NoesisGUI/NoesisPostProcessor.cs:248)
NoesisPostProcessor:Build() (at Assets/Editor/NoesisGUI/NoesisPostProcessor.cs:234)
NoesisPostProcessor:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Assets/Editor/NoesisGUI/NoesisPostProcessor.cs:172)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[])
3. If I hardcode the path to the JPG image in XAML then it loads properly:
Code: Select all
<Image Source="Resources/senil_prepare.jpg" Canvas.Top="45" Canvas.Left="115"/>
Code: Select all
<Image Source="{Binding Icon}"/>
Code: Select all
Exception: Resource Resources/senil_prepare.jpg not found
Noesis.Error.Check () (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisError.cs:21)
Noesis.UIRenderer.Noesis_CreateRenderer (IntPtr root) (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisUIRendererImports.cs:87)
Noesis.UIRenderer..ctor (Noesis.FrameworkElement content, Vector2 offscreenSize, UnityEngine.GameObject target) (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisUIRenderer.cs:61)
NoesisGUIPanel.OnEnable () (at Assets/Plugins/NoesisGUI/Scripts/NoesisGUIPanel.cs:172)