简体   繁体   English

jMonkey 是否支持 96x96.ico 资产?

[英]Does jMonkey support 96x96 .ico assets?

Summary概括

A Java application uses jMonkey for rendering purposes. Java 应用程序使用 jMonkey 进行渲染。 This application is loading a custom icon when in view mode.此应用程序在查看模式下加载自定义图标。 The icon in use is 32x32 and is loaded like this, as it is a cursor:正在使用的图标是 32x32 并像这样加载,因为它是 cursor:

JmeCursor cursor = (JmeCursor) Services.getAssetManager().loadAsset( "/path/someIcon.ico" );

Where Services is just some irrelevant class to retrieve the jMonkey AssetManager . Services只是一些无关紧要的 class 来检索 jMonkey AssetManager

I read about typical .ico sizes and one of them appears to be 96x96.我阅读了典型的.ico大小,其中一个似乎是 96x96。 However when attempting to load a 96x96 .ico file as an asset using the code snippet above, I ran into jMonkey not being able to load the asset, even though according to debugger output the resource was indeed found.但是,当尝试使用上面的代码片段将 96x96 .ico文件作为资产加载时,我遇到了 jMonkey 无法加载资产,即使根据调试器 output 确实找到了资源。

When checking with the debugger, I can follow the loading process into the DesktopAssetManager#loadAsset until it dives deeper into classes I cannot see and then a Throwable without useful stack trace, message or other info shows up.使用调试器检查时,我可以将加载过程跟踪到DesktopAssetManager#loadAsset ,直到它深入到我看不到的类中,然后出现一个没有有用堆栈跟踪、消息或其他信息的Throwable When I switch to any other 32x32 .ico file all works fine again.当我切换到任何其他 32x32 .ico文件时,一切正常。

Question问题

Right to the chase:追逐权:

Is jMonkey capable of loading 96x96 .ico files as assets via loadAsset ? jMonkey 是否能够通过loadAsset加载 96x96 .ico文件作为资产?

Yes.是的。 I created an.ico with the following imagemagick command (and added a 96x96 option):我使用以下 imagemagick 命令创建了 an.ico(并添加了 96x96 选项):

convert image.png  -bordercolor white -border 0 \
      \( -clone 0 -resize 16x16 \) \
      \( -clone 0 -resize 32x32 \) \
      \( -clone 0 -resize 48x48 \) \
      \( -clone 0 -resize 64x64 \) \
      \( -clone 0 -resize 96x96 \) \
      -delete 0 -alpha off -colors 256 favicon.ico

Source: https://unix.stackexchange.com/questions/89275/how-to-create-ico-file-with-more-than-one-image/89276#89276来源: https://unix.stackexchange.com/questions/89275/how-to-create-ico-file-with-more-than-one-image/89276#89276

ImageMagick: https://imagemagick.org/ ImageMagick: https://imagemagick.org/

It loaded without problems using assetManager.loadAsset()使用assetManager.loadAsset() 加载没有问题

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 hbase客户端从94.x升级到96.x - hbase client upgrade from 94.x to 96.x Swing 是否支持 *.ico 文件? - Does swing support *.ico files? 查询返回96,但ResultSet返回0 - Query Returns 96 but ResultSet returns 0 出现运行时错误 - ArrayIndextOutofBoundException - 96 - Having a Runtime error - ArrayIndextOutofBoundException - 96 字符串值不正确:&#39;\\ xF0 \\ x9F \\ xA4 \\ x96 - Incorrect string value: '\xF0\x9F\xA4\x96<b…' for column 'body' at row 1 (com.joyfm96.joy.EntertainmentFragment&#39;中的(android.content.Context,android.support.v7.widget.RecyclerView)&#39;无法应用于&#39;()&#39; - (android.content.Context, android.support.v7.widget.RecyclerView)' in 'com.joyfm96.joy.EntertainmentFragment' cannot be applied to '()' JdbcOdbcDriver.finalize()行中的未知NullPointerException:96 - Unknown NullPointerException in JdbcOdbcDriver.finalize() line: 96 Spring Boot and Mysql: Caused by: java.sql.SQLException: Incorrect string value: '\x96 like...' for column 'description' at row 1 - Spring Boot and Mysql : Caused by: java.sql.SQLException: Incorrect string value: '\x96 like...' for column 'description' at row 1 如果我将整数 160 分配给整数变量并尝试将其存储在字节变量中,为什么该值会从 160 更改为 -96? - If I assign and integer variable the integer 160 and try to store it in a byte variable, why does the value change from 160 to -96? Gradle应用程序插件在运行应用程序时停留在96%? - Gradle application plugin stuck at 96% when runs app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM