UIColor colorWithPatternImage not tiling properly on non-retina iPad

Moderator
Posts: 381
Joined: 2002.08
Post: #1
I've got a pattern image (file attached) that is not tiling properly on non-retina screens.

However, it's 128x128, and from what I can tell looks good.

I have attached two images showing how it tiles - one has horizontal black lines running through it. This is what it looks like on an iPad 1 and 2, which is definitely wrong.
I've also attached an image showing what it looks like in the non-retina iPad Simulator - it's nice and continuous, no black lines.

The incorrect, black-line-added look on an iPad 1 and 2:
[Image: background_tiled_device.jpg]

The correct, continuous look in the iPad Simulator:
[Image: background_tiled_sim.jpg]

The pattern image file itself (a 128x128 png):
[attachment=6]

Any idea why that black line is appearing?

There must be something in the file that's being interpreted by the non-retina iPad funny.
It does not do this on iPad 3 and 4 since I have a different sized png file, and I guess that's causing no problems.


Attached File(s) Thumbnail(s)
   

KB Productions, Car Care for iPhone/iPod Touch
@karlbecker_com
All too often, art is simply the loss of practicality.
Quote this message in a reply
Moderator
Posts: 381
Joined: 2002.08
Post: #2
How about I answer my own question...

Tried re-saving the attached pattern image as a 32-bit png file, and everything started working.

So... good thing to note if you're ever using an image as a pattern in iOS: use a 32-bit png file. This is my standard practice, but I was supplied this image file by my designer, so I didn't save it from source as a 32-bit png.

KB Productions, Car Care for iPhone/iPod Touch
@karlbecker_com
All too often, art is simply the loss of practicality.
Quote this message in a reply
Moderator
Posts: 770
Joined: 2003.04
Post: #3
You may want to file a bug report:
http://stackoverflow.com/a/9779997
Quote this message in a reply
Moderator
Posts: 381
Joined: 2002.08
Post: #4
Good call - and thanks for the link!

I've filed it under rdar://13251019

KB Productions, Car Care for iPhone/iPod Touch
@karlbecker_com
All too often, art is simply the loss of practicality.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  All of the sudden my device is not provisioned properly Nosredna 12 5,055 Apr 21, 2009 10:11 PM
Last Post: kodex