iPad 版的 Default-Portrait.png:有什么方法可以使文件大小更小吗?

发布于 2024-10-10 05:01:14 字数 312 浏览 0 评论 0原文

我正在使用 MonoTouch 制作通用应用程序,并添加我的 Default-Portrait.png 文件。仅该文件(768x1004 .png 文件)就使应用程序的大小增加了 711k。我的应用程序本身只有大约 7 兆,因此仅用于启动屏幕就增加了 10%。

我可以轻松地将这个东西制作为 80k jpg 文件而不是 png 文件,但设备似乎不查找 .jpg 文件。有人有减小这个发射艺术的尺寸的技巧吗?

在这一点上,我想我可能会忽略启动艺术并加载我自己的 jpg 并在我有能力时立即显示它。这将缩小我的应用程序的大小,但它不如像大多数应用程序那样立即显示启动艺术比例那么好。

I'm making a Universal App using MonoTouch, and I'm adding my Default-Portrait.png file. That file alone (a 768x1004 .png file) is adding 711k to the size of the app. My app itself is only about 7 megs, so it's adding 10% just for the splash screen.

I could easily make this thing an 80k jpg file instead of a png, but the device doesn't seem to look for a .jpg file. Does anyone have tips for reducing the size of this launch art?

At this point, I'm thinking I might just leave the launch art out and load my own jpg and display it as soon as I have the ability to. That'll keep my app size down, but it's not as nice as having the launch art scale in immediately like most apps do.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

自控 2024-10-17 05:01:14

嗯……考虑到 iPad 的屏幕和用户期望的视觉质量,我就这样吧。

但如果您确实想减少磁盘空间,请尝试转到“项目”>“编辑项目设置>构建(顶部选项卡),然后搜索名为“压缩 PNG 文件”的参数。确保已检查。它将在将文件加载到磁盘之前运行 pngcrush 实用程序(之后检查 IPA 存档的大小以查看它是否有任何效果)。

Hmmm...given the screen of the iPad and the visual quality users are expecting, I'd just leave it like that.

But if you do want to reduce the disk space, try going to Project > Edit Project Settings > Build (tab at top), and searching for a parameter called "Compress PNG Files." Make sure that's checked. It'll run the pngcrush utility before loading the file onto disk (check the size of your IPA archive after to see if it had any effect).

格子衫的從容 2024-10-17 05:01:14

pngcrush 也很好,但这不会降低图像的质量。如果您可以选择降低图像质量,那么您可以尝试此工具:http://www.punypng。 com/ - 或者只是使用图像编辑工具来“优化”图像......

pngcrush is nice as well, however that will not reduce the quality of you image. If reducing the quality of the image is an option for you, then you might try this tool: http://www.punypng.com/ - or just use an image editing tool to "optimize" the image ...

冷…雨湿花 2024-10-17 05:01:14

如果你想真正压缩这些 PNG,我推荐 pngout,而且这不会降低你的质量。它只是删除不必要的元数据(如 pngcrush)并使用自己的压缩算法,该算法与 PNG (zlib) 中使用的常规解压缩器兼容。不过,这确实很慢。

一个更简单的选择是在您选择的图像处理程序中尝试“另存为网络”。从 Acorn 导出(不仅仅是常规保存)有时会给我带来小得多的文件。对于具有单一颜色的大而均匀区域的默认图像尤其如此(屏幕截图,黑色屏幕中间的小徽标)。

I recommend pngout if you want to really squeeze those PNGs down, and this won't cost you any quality. It simply removes unnecessary metadata (like pngcrush) and uses its own compression algorithm which is compatible with the regular decompressor used in PNG (zlib). It's really slow, though.

A simpler option is to try "Save for web" in your image manipulation program of choice. Exporting from Acorn (not just the regular save) sometimes gives me vastly smaller files. This is especially true for default images which have large, uniform areas in one colour (screenshots, a small logo in the middle of a black screen).

帝王念 2024-10-17 05:01:14

您有什么理由如此想要减小文件大小吗?我认为这对你来说并不重要。我刚刚检查了 3 个应用程序,Default.png(各种纵向/横向品种)在 29KB 到 422KB 之间,所以虽然你的应用程序看起来确实有点重,但你仍然低于 3G 下载限制。

Is there any reason why you want to reduce the file size that badly? I don't think it matters in your case. I just checked 3 of my apps and the Default.png (of various portrait/landscape varieties) is between 29KB and 422KB, so whilst yours do seem a little heavy, your still way under the 3G download limit.

暗恋未遂 2024-10-17 05:01:14

您确定它会增加应用程序的大小吗?你对比一下之前和之后吗?

Xcode 会为您在图像上使用 pngcrush。我知道,因为我只是尝试用 jpeg 代替 png 并得到以下结果:

在此处输入图像描述

所以,简而言之,除了事先简化图像之外,无需做太多事情。 Xcode 将处理剩下的事情。

Are you positive it's adding that much to the size of the app? Did you compare a before and after?

Xcode uses pngcrush on the images for you. I know because I just tried to substitue jpegs for pngs and got the following result:

enter image description here

So, in short, there's not a lot to be done except simplify the image beforehand. Xcode will handle the rest.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文