开发者

CGImageGetWidth returns different size then actual image

Hi i have a lot of image reading in my app and when I load the files i use CGImageGetWidth and CGImageGetHeight to get the sizes of the images.

However this does not seem to return the right values all the time.

For example if I have an image whose size is 114x14, these functions will return 126x22 or something random like that.

The really odd part is that it doesn't happen all the time(changes from build to build) but it tends to happen to the same group of images.

开发者_StackOverflow中文版

So either i have some kind of coding error that i am not aware of or the images have some setting to them that makes them handle differently.

Anybody know of what could possibly cause this kind of behavior?

Thanks


Check the resolution of the image. Some image formats allow for a pixels-per-inch of something other than the standard 72 pixels per inch.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜