Live data from Hacker News

WebKit Limit on Retina JPG Image Display

duncandavidson.com

11–20 of 45 posts

Re: WebKit Limit on Retina JPG Image Display

#11
post #6

Earlier quoted context omitted.

There's also no reason you can't split the image up (e.g. 2048x2048 -> 4x1024x1024) and render it in 4 pieces. Where a hard limitation like that exists, implementations frequently sidestep them.

If you do this though, make sure you split at JPEG block boundaries. That means that every column should have a width divisible by 8 except the rightmost, and every row should have a height divisible by 8 except the bottom. Otherwise you may see a noticeable seam.

You can split the JPEGs at bit mapped images on the device before rendering. At that pointed you wouldn't be limited tithe block boundaries anymore.

edit for clarity: don't manipulate images in the JPEG domain.

Re: WebKit Limit on Retina JPG Image Display

#12
post #10

On a mostly unrelated note, I wish blatanly marketing driven terms like "retina display" would stop getting thrown around like this. Thanks to Apple's latest marketing adjustment for the iPad 3, it turns the phone I've owned for over 2 years now actually posesses a "retina display" (N900 for anyone wondering). At the viewing distance specified by Apple, the human retina is in fact capable of discerning a far higher p…

How is he "throwing around" this term? He's specifically talking about the iPad 3. Apple uses this marketing term to signal to the purchaser that they are going to get a certain pixel density. I see retina display, I know I will get a "good looking" display by Apple's standards. If I trust Apple, it means something. That's the purpose of marketing and branding. So what if your phone also has the same pixel density?

Do you have a problem with marketing in general? Is it a problem that Audi makes quattro cars or that Volkswagens have 4motion or BMWs have cars with 'x' in the model number? They only signify 4WD after all.

BTW, iPhone 4 is a 3.5 inch 640×960 resolution (326 ppi). N900 is 3.5 inch 800 × 480 resolution (267 ppi). Not that it matters either way.

Re: WebKit Limit on Retina JPG Image Display

#13

We ran into this issue while building our HTML5/Mobile Webkit panorama viewer. It took a long time to figure out what was going on, I almost feel that webkit would've been better to just skip the image and log an error to the console, since by resizing your image without your permission typically causes rendering bugs since they literally resize your image down in-line without telling you. We didn't realize it could…

You could just slice it into multiple JPGs. It's probably even better for parallel download.

Re: WebKit Limit on Retina JPG Image Display

#14
post #10

On a mostly unrelated note, I wish blatanly marketing driven terms like "retina display" would stop getting thrown around like this. Thanks to Apple's latest marketing adjustment for the iPad 3, it turns the phone I've owned for over 2 years now actually posesses a "retina display" (N900 for anyone wondering). At the viewing distance specified by Apple, the human retina is in fact capable of discerning a far higher p…

How is he "throwing around" this term? He's specifically talking about the iPad 3. Apple uses this marketing term to signal to the purchaser that they are going to get a certain pixel density. I see retina display, I know I will get a "good looking" display by Apple's standards. If I trust Apple, it means something. That's the purpose of marketing and branding. So what if your phone also has the same pixel density? D…

>BTW, iPhone 4 is a 3.5 inch 640×960 resolution (326 ppi).

But the new iPad is 264 PPI.

Re: WebKit Limit on Retina JPG Image Display

#15
post #14

Earlier quoted context omitted.

How is he "throwing around" this term? He's specifically talking about the iPad 3. Apple uses this marketing term to signal to the purchaser that they are going to get a certain pixel density. I see retina display, I know I will get a "good looking" display by Apple's standards. If I trust Apple, it means something. That's the purpose of marketing and branding. So what if your phone also has the same pixel density? D…

>BTW, iPhone 4 is a 3.5 inch 640×960 resolution (326 ppi). But the new iPad is 264 PPI.

iPad is "retina" at a viewing distance of 15 inches. iPhone is "retina" at a viewing distance of 10 inches.

Pixel density is only half the equation.

Re: WebKit Limit on Retina JPG Image Display

#18
post #13

We ran into this issue while building our HTML5/Mobile Webkit panorama viewer. It took a long time to figure out what was going on, I almost feel that webkit would've been better to just skip the image and log an error to the console, since by resizing your image without your permission typically causes rendering bugs since they literally resize your image down in-line without telling you. We didn't realize it could…

You could just slice it into multiple JPGs. It's probably even better for parallel download.

Better? Wrong. Please read "Minimize HTTP Requests" here:

http://developer.yahoo.com/performance/rules.html

Re: WebKit Limit on Retina JPG Image Display

#19
post #6

Earlier quoted context omitted.

There's also no reason you can't split the image up (e.g. 2048x2048 -> 4x1024x1024) and render it in 4 pieces. Where a hard limitation like that exists, implementations frequently sidestep them.

If you do this though, make sure you split at JPEG block boundaries. That means that every column should have a width divisible by 8 except the rightmost, and every row should have a height divisible by 8 except the bottom. Otherwise you may see a noticeable seam.

Better make that 16 unless your image is greyscale.
Post reply on HN