图像在仪器中显示加载两次(iPhone + openframeworks)
我正在使用 openFrameworks 为 iPhone 进行编程。我使用仪器/系统使用在设备中运行该项目,我发现所有图像似乎都加载了两次,即使我只使用它们一次。
(请参阅此处仪器的屏幕截图 http://bit.ly/htoaNx )
我不知道这是否可以是 FreeImage 问题还是我无法解释结果?
谢谢!
马克
I am programming for the iPhone using openFrameworks. I ran the project in the device with Instruments/System Usage and I saw that ALL the images appear to be loaded twice, even if I use them only once.
(see screen capture of Instruments here http://bit.ly/htoaNx )
I don't know if this could be a FreeImage problem or I am failing at interpreting the results?
Thanks!
Marc
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所有这些告诉您的是 fopen 和 fclose 在同一个文件上被调用两次。最可能的解释是 FreeImage 或 openFrameworks 在实际加载图像之前检查文件是否存在(fopen(),然后立即 fclose())。另一种可能性是打开文件以确定格式/位深度/大小,关闭文件,分配内存,然后重新打开文件并读取实际图像数据。
All that is telling you is that fopen and fclose are being called twice on the same file. The most likely explanation for that is that either FreeImage or openFrameworks checks to see if the file exists (fopen() then immediately fclose()) before actually loading the image. Another possibility is the file is opened to determine the format/bit depth/size, the file is closed, memory is allocated, then the file is re-opened and actual image data is read.