ios - Why the property Size of UIImage is half of the real picture size? -


i have picture named pic of 268*381, have defined

uiimage* tempimg = [uiimage imagenamed:@"pic"]; 

but when print

nsstringfromcgsize(tempimg.size) 

it shows {134, 190.5}

i can't understand principle of this, , grateful solver!

from docs uiimage size:

in ios 4.0 , later, value reflects logical size of image , measured in points

remember pixels equal points times scale. or points pixels divided scale.

your 268x381 size in pixels. output of nsstringfromcgsize(tempimg.size) in points. result of {134, 190.5} means image scale of 2. have image pic@2x.png.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -