Retina Display and images @2 Support
I have a doubt about how to use the new size of images for retina display. I guessed that would have a sample of that on hpub-example-for-baker-3.2 , but I didn´t find it there. What exactly do I have to do if I want to use retina display images? Just create the new images, with the @2 on names? No code change on XCode or on HTML? Can someone help me? Thank you very much :)
You should use the standard HTML techniques, as any other website. :)
If you search around the web, you'll find lots of valuable details, like this one: http://flowz.com/2010/07/css-image-replacement-for-iphone-4-high-dpi-retina-display/
Consider that depending on what you have to do, you can use a double-sized image visualized scaled down to 50% or use media-queries in the CSS. :)
@folletto Have you gotten this to work on a non-retina iPad with a full screen image? Just wondered if you had tested it. No matter which way I try to do it, adding a full screen retina image results in about a 5 second delay in loading the page and slows our app down considerably. We have an iPad 1 for testing, but it also delays loading in the retina display simulator. Let me know if you have gotten it to work.
It's very strange, but we can do some testing, sure. Just to be sure: are you doing the proper replacement, starting with the default image and using the new one only on the iPad 3?
Could you include here the code you used?
I was trying to use only one image and scaling it down, not serving two different images depending on the device. I was going off the advice in this thread (answer 2): http://stackoverflow.com/questions/7733223/serving-non-retina-and-retina-displays-with-one-code-base-framework-for-scaling
But now that I look at it I think I might have a problem in the meta tags because in the log in Xcode it just pauses and then sets the height of the viewport, which it doesn't seem to do with without my retina test images.
Here is the code basics: Edit: I can't get this to display as code in my comment, how do I fix that?
<html>
<head>
<title>Title goes here</title>
<meta name="viewport" content="width=768; initial-scale=1.0;"/>
<link rel="stylesheet" type="text/css" href="css/book.css">
<meta charset="utf-8">
</head>
<body>
<div id="page" class="chapter">
<img src="images/test-images/retina-test-1.jpg" width="768" height="1024" align="top" class="starter"/>
</div>
</body>
</html>
http://flowz.com/2010/07/css-image-replacement-for-iphone-4-high-dpi-retina-display/
but the problem now, is the solutions of adobe, whit one desing export two diferents issue of the app , one for ipad2 and one for the new ipad, automatic ...this is something good for this kind of solutions, but is something very bad for solutions in html5.... the people now think about this and is possible they decided use solutions like adobe.
apple probably make a png format with the two kinds of resolutions in the same file but this increased the size of the books
it´s a very bad news for the html5 solutions
one jpg 768x1024px in 72ppi for ipad 2 - 1mb one jpg 768x1024px in 150ppi for new ipad 3,5mb
https://github.com/leonsmith/retina-replace-js
i use this solution works fine, but make very slow everything
Uhm I don't get it: designing in HTML5 is still smaller in size than Adobe's solutions, and if you start working at Retina resolution is as simple as a couple of clicks in Photoshop to do the exports, while most of the page should be HTML/CSS, so it doesn't need any change.
Could you clarify what's the problem?
don´t understand me well
with solutios like adobe you only work one time, and make two issues automatically and the user download only the issue optimizated for their ipad 2 or new ipad.
in html5 the work is double, and if you make all the image options in one book is too heavy, and it´s a poor solution.
i always talk about digital magazines (not simple books) whit a lot of desing no only html5 page . the desing in html5 is too limited about typhografy and compositions and need have a lot of pages in full images in the html page...
see the table of weights that I have and make your own calculatons to put a double set of images in a same book
i don´nt have the answers y only say that i love html5 for magazines but retina now is a big problem....
you know if now you can upload in apple one issue for retina and othe for ipad 2, of the same issue....is the less bad of the solutions...but you need work twice.
Ok, I got the download issue, that's kinda easily solvable however by doing the same yourself: a simple page that downloads the issue the first time the user runs it. It's not a shelf, of course, but it will allow that kind of granularity,
For the other issue... you say you don't use HTML5... but then, what are you using? How are you building the pages?
this is an option too: http://retinajs.com/
hi there! i tried a lot with jpg and png and found a solution for me, which works on both ipad2 and ipad3-retina. first thing - don´t use .jpg anymore!!!!!!!!!!! you won´t get any satisfied solution on retina. all images must be .png - save your images as png-8bit from photoshop. also there is software in the app-store to compress png. they get as small as web-jpg. the screensize must be 1024x768 - the images size 2048x1536. so, they fit well on ipad2 and you get very sharp images on retina as well. and you can use it in html5-websites ;-)
… this works for me - maby there´s another solution.
Thanks for the feedback! That's awesome. :)
hitchio, you wrote:
the screensize must be 1024x768 - the images size 2048x1536.
Could you please provide your CSS/HTML source code for this method...
And, which software can you recommend for PNG8 compression?
Thanks in advance!
hi!
this runs for ipad3 and ipad2. i use photoshop --> save for web - png 8 also you can use "PNG Compressor" from appstore.
alternative you can use retina.js, but then you have to have 2 png in one folder and rename the 2048px to [email protected]. in the "head" connect to retina.js read at - http://retinajs.com
but then you´ll get a complete bigger size file
h.
@hitchio, thank you!
So did you mean - <img src="magazine/really2048picture.png" width="768" height="1024"/> ?
(or here better use "style" attribute?)
And what about default <meta name="viewport" content="width=768; initial-scale=1.0;"/> in the page header?
How should it be changed?
here´s the test-site. the source of the img = 2048x1536, scaled down to 1024x768. if you open on ipad3 you´ll see it working on retina, also on iphones. with content="user-scalable=yes you can scale the site by using 2 fingers pinching out. copy the html for your purpose ;-)
http://www.misfit.tv/web2013/test.html
i do use very often "Hype" from tumult.com. this software makes this process automatically for you. check out hype from app -store
i hope, this helps. greetinx h.
I'm closing this because the original problem (from 1 year ago) is different from the current discussion. Open a new one if necessary. ;)
@hitchio Can you tell me the negative results of using JPEG? Do you mean that the iPad does not resize JPEG as well as PNG?