html - Do PNGs (or JPGs) have a DPI? Or is it irrelevant when building for retina? -


a simple question have been having great difficulty finding definitive answer to: png files have dpi? or perhaps more importantly, relevant when building retina-enabled sites/apps?

i've received psd assets our designer retina ipad app must convert html display within app. typically, receive such files 2048x1536 @ 72 dpi -- double size standard screen dpi. typically use css tell browser how display it.

but time designer instructed provide psds @ 1024x768 @ 144 dpi (standard size double dpi.) believe incorrect, dpi setting within photoshop intended print purposes. plus, when save 144 dpi psd png or jpg, same 1 saved 72 dpi (or 30,000 dpi matter) psd. dpi doesn't seem reflected in either setting can see in resultant file nor in different file size. seems, @ best, metadata.

so, it's understanding dpi isn't relevant here, , should asking double-sized assets retina projects, confirmation/clarity on issue before asking new assets. work many designers transitioning print backgrounds common issue encounter , i'd able provide better guidance our requirements in future.

dpi relationship between image's pixel dimensions , physical size appears (or should appear) when displayed, regardless of how it's displayed (screen, print, whatever). no image format inherently has dpi, actual image that's made of pixels , should appear physical size has dpi.

you're correct dpi metadata far image file concerned. image grid of pixels no inherent physical size, dpi value expresses intended physical size. example, image that's 144 pixels wide dpi of 144 should appear 1 inch wide when displayed, image that's 144 pixels wide dpi of 72 should appear 2 inches wide when displayed.

the dpi value stored in image can used scale automatically correct physical size when it's displayed on device dpi known. example, 144dpi image displayed on 72dpi monitor should scaled 50% in each dimension, 144 pixels (one inch) of image mapped 72 pixels (one inch) of monitor surface. web browsers, however, typically don't this; image pixels mapped directly screen pixels, have manually scale images have pixel dimensions appropriate monitor they'll displayed.

you mentioned getting images @ 2048x1536 @ 72 dpi , 1024x768 @ 144 dpi, not @ equivalent. 2048x1536 72dpi image should appear 28.4 inches wide (2048/72), 1024x768 144dpi image should appear 7.1 inches wide (1024/144). sure didn't mean 2048x1536 @ 144dpi , 1024x768 @ 72dpi (both of 14.2 inches wide)?

btw, conventional (non-retina) monitors these days typically 96 100 dpi, not 72. example, 20-inch dell 2007wfp has pixel dimensions of 1680x1050. that's 1981 pixels on diagonal, 99 pixels per inch. "px" unit in css defined 1/96th of inch, may correspond more 1 physical pixel on high-dpi screen.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -