News for hackers. Stuff that matters.
Re:WebKit Limit on Retina JPG Image Display by orta on Thursday March 22, 2012 @08:46AM (#3739437)
When working in UIKit developers are warned now to use images that are larger than 1024x1024 because that is the limit on the size if a texture in openGLES. I wouldn't be surprised to see this being doubled for the retina and Apple using that as the hard limit.

( You should avoid creating UIImage objects that are greater than 1024 x 1024 in size. Besides the large amount of memory such an image would consume, you may run into problems when using the image as a texture in OpenGL ES or when drawing the image to a view or layer - http://developer.apple.com/library/ios/#documentation/uikit/...)

Re:WebKit Limit on Retina JPG Image Display by jbrennan on Thursday March 22, 2012 @09:10AM (#3739509)
I believe that limit was lifted as of the iPhone 3GS (i.e., for OpenGL ES 2.0 devices and greater).
Re:WebKit Limit on Retina JPG Image Display by daeken on Thursday March 22, 2012 @09:30AM (#3739572)
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.
Re:WebKit Limit on Retina JPG Image Display by mistercow on Thursday March 22, 2012 @09:37AM (#3739597)
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.
Re:WebKit Limit on Retina JPG Image Display by jonhohle on Thursday March 22, 2012 @11:03AM (#3739983)
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 by 0x09 on Thursday March 22, 2012 @12:59PM (#3740708)
Better make that 16 unless your image is greyscale.
Re:WebKit Limit on Retina JPG Image Display by superrad on Thursday March 22, 2012 @06:18PM (#3742331)
I think it's actually just been doubled to 2048x2048. OpenGL ES 2.0 seems to define a 64x64 as the minimum requirement for texture size to meet the spec, which is really not much at all.