Improve item icon export: unified sizes, 3D block dynamic icons, and lossless PNG compression#2
Merged
Merged
Conversation
Use max PNG compression for all exported icons and render 3D block dynamic icons at 256px. Fix saveToFile creating the file path itself as a directory by only creating the parent directory.
Owner
|
1.物品按实际大小导出就是单纯的为了减少体积,导出更大的没意义,我认为通过css设置为邻近放大就行了 |
Contributor
Author
文件大小可以通过无损压缩进一步压缩大小,是否保留256都行,我按照前面的要求做到调整,如果不需要可以回滚掉,不过这会连带出另一个问题,如AE线缆等物品他不是itemblock,现有3D物品检测判断不到这个,会导致降级成16px然后图标会糊掉,包括不限于AE物品 GC火箭等,文件名字没动,我只加的PNG无损压缩。目前对于动态物品按照实际大小导序列,block保持256 |
Owner
AE线缆。。头晕啊,如果没有别的办法,要么特判,要么统一256了 (你说,导出成矢量图有没有搞头()) |
iouter
approved these changes
Jun 24, 2026
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
size/frameCount字段只记录动图。Details
图标尺寸
SINGLE_FRAME_SIZE = 256,普通单帧固定 256px 渲染。icon_*_dynamic.png按动态纹理实际尺寸;3D 方块动图用 256px。size(动图单帧高度)和frameCount仅对动图记录,静态图为null。无损压缩
FBOHelper.saveToFile从默认ImageIO.write(零压缩)改为ImageWriteParam最高压缩等级写 PNG。icon_Avaritia_Dire_Crafting_dynamic.png从 4.9MB 降到 2.2MB。