[英]How to get dimension of png file stored in documents folder of iPhone application?
I am facing a problem, hope some one will help me to sort it out. 我正面临一个问题,希望有人帮我解决问题。 I am working on an application that saves png files in the documents folder of the iPhone application, and also user can view the files that were saved.
我正在开发一个将png文件保存在iPhone应用程序的文档文件夹中的应用程序,用户也可以查看保存的文件。 So, i want to know is there any way to find out the dimension of the file being displayed?
所以,我想知道有没有办法找出正在显示的文件的维度? so that, if image dimension is bigger than my imageView then i can make them scroll, currently image is shrink.
这样,如果图像尺寸大于我的imageView,那么我可以让它们滚动,目前图像缩小。
this may help... 这可能有帮助......
ImageIO framework (CGImageSource...)
similar Q to accessing UIImage properties without loading in memory the image 类似的Q 访问UIImage属性而不在内存中加载图像
Create a UIImage from the file, using imageWithContentsOfFile:
. 使用
imageWithContentsOfFile:
从文件创建一个UIImage。 The size of the image is held in the size
property of your new UIImage object. 图像的
size
保存在新UIImage对象的size
属性中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.