将 Retina 分辨率图标缩小为标准分辨率
我有我的应用程序的用户界面,但我想在用户界面的界面生成器中工作。我只有视网膜缩放集(640 x 960)。有很多 .png,但我不知道应该做什么才能实现 320 x 480 比例 ui 和 640 x 960 比例 ui。有没有办法在 xcode 中执行某些操作,或者有没有办法使用预览或类似功能来缩小图像。如果唯一的方法是使用缩放程序,那么我应该将它们缩放到什么程度? 谢谢
I have my ui for my app but I would like to work within interface builder for the ui. I only have a Retina scaled set (640 x 960). There are a lot of .png's but I don't know what I should do to be able to implement both 320 x 480 scale ui and 640 x 960 scale ui. Is there a way to do something from within xcode or is there a way to scale down the images using preview or similar. If the only way would be to use a scaling program, then what should I scale them to?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您一定会喜欢这个小工具,它在 Mac Store 中免费提供
http://itunes .apple.com/au/app/unretiner/id411277085?mt=12
[编辑]
听起来您也不确定如何实现视网膜和普通界面。
每个“图形对象”都需要一对图像,并且视网膜版本的文件名应附加@2x。因此,对于名为“background.png”的图像,您将拥有一个名为“[email ;protected]”适用于视网膜,“background.png”适用于旧屏幕。
在界面生成器文件中,您只需选择“background.png”版本,操作系统就会选择视网膜版本并在需要时应用它。
上面提到的工具还将使用正确的文件名保存“未视网膜化”文件,因此如果您使用附加了 @2x 的图像,它也会将其缩小并重命名!
You will love this little tool, free in the Mac Store
http://itunes.apple.com/au/app/unretiner/id411277085?mt=12
[EDIT]
It also sounds like you're not sure about how to implement both retina and normal interfaces.
You will need a pair of images for each "graphic object" and the retina version should have it's filename appended with @2x. So in the case of an image called "background.png" you will have one called "[email protected]" for retina, and "background.png" for the older screens.
In your interface builder files you can simply choose the "background.png" version and the OS will pick up the retina version and apply it when needed.
The tool mentioned above will also save the "unretinized" files with the correct filename so if you use an image with the @2x appended, it will scale it down and rename it too!
您可以使用预览来缩放图像。打开图像,进入
工具
菜单并选择调整大小...
。将宽度(和高度)更改为 50%,然后按“确定”。然后使用
文件/另存为...
保存新的非视网膜图像。You can use Preview to scale the images. Open the image, go into the
Tools
menu and selectAdjust Size...
. Change the Width (and height) to 50 percent and press OK.Then use
File/Save as...
to save your new not-retina image.我不是 iPhone 开发人员,但我相信处理此问题的正确方法是使用两组图标:一组用于 iPhone 3GS 及更早版本,一组用于 iPhone 4。缩小图标会使它们看起来很混乱。
I'm not an iPhone developer, but I believe the correct way to handle this would be to have two sets of icons: one for the iPhone 3GS and earlier and one for the iPhone 4. Scaling icons down will make them look muddy.