TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

IOS Image Tricks

90 点作者 gurgeous将近 13 年前

7 条评论

bradleyland将近 13 年前
I'm being a bit picky here, but IOS is an operating system that runs on Cisco networking equipment. "Images" is how one refers to the software that is loaded on the switch/router/etc. For example, I can buy an "layer 3 enhanced image" for a Cisco switches that will give me limited routing capabilities.<p>For that reason, one should be careful about the case of the letters when referring to IOS and iOS, as they can lead to confusion if not used appropriately.
评论 #4303224 未加载
评论 #4303818 未加载
oofabz将近 13 年前
Using 16-bit images won't save any memory, and may actually use more memory. The iOS graphics pipeline requires 32-bit images for rendering, so all other types of images are converted to a 32-bit texture.<p>If you are trying to optimize memory consumption, you need to measure memory consumption! You can't just change some code and assume your memory consumption has gone down.
评论 #4304152 未加载
评论 #4304599 未加载
kstenerud将近 13 年前
You could compress those images down to 4bpp or even 2bpp by encoding to PVRTC. Since they're photorealistic images you'll retain image quality despite being 8x or even 16x smaller, and the graphics chip supports the format natively so you don't need to decompress it.<p>I use it in games whenever a photorealistic image is required. Some more info:<p><a href="http://www.uchidacoonga.com/2011/07/pvrtc-textures-and-cocos2d/" rel="nofollow">http://www.uchidacoonga.com/2011/07/pvrtc-textures-and-cocos...</a><p><a href="https://developer.apple.com/library/ios/#qa/qa2008/qa1611.html" rel="nofollow">https://developer.apple.com/library/ios/#qa/qa2008/qa1611.ht...</a>
评论 #4303533 未加载
0x0将近 13 年前
Very interesting read, especially the image sprite part and how it improved cpu usage.<p>BTW:<p><pre><code> gIsLowCPU = [gModel matches:[NSRegularExpression re:@"^(iPhone1|iPod[12])"]]; </code></pre> this is gonna be fun when the iPhone 10 is released!
评论 #4303173 未加载
评论 #4303707 未加载
kalleboo将近 13 年前
I remember back in the day of 60 MHz PowerPC with 16 MB RAM, that I used software that would decode JPEG files in blocks, so you could look at high-res photos without holding the whole uncompressed image in RAM. In fact, I have an app like that for my Android phone for viewing a very high res bike route map I rendered out of a PDF.<p>Are there any libraries like that floating around that would work in this situation?
campnic将近 13 年前
So, it sounds like 'spriting' in this context is a way of sending a stitched together larger image and then showing a portion of it in each uiimage. I work on Android, and I'm interested in the technique but just was looking for some validation before I go off doing research.
nutjob123将近 13 年前
Here's a tip when you start working on android. There is a method in the bitmap factory class that can handle image scaling for you on device.