Images distorted

I’ve noticed that corona seems to distort images slightly, messing with the shape and color in weird ways. I have a 5x5 rounded square image that is not rendering accurately. The size is right, but the pixels are messed up a bit. I have set scale = “none” in the config file, so presumably this is not a scaling issue.

Here’s what the image is supposed to look like (magnified 5 times):

And this is how it is being displayed in the simulator:

Any idea what might be happening here? Is it doing some kind of anti-aliasing? [import]uid: 72609 topic_id: 17934 reply_id: 317934[/import]

Odd number of pixels.

Make it 4x4 or 6x6 - if you want it to look as it does you can add one transparent pixel to the side/bottom to bump up the image size while keeping the same look.

Peach :slight_smile: [import]uid: 52491 topic_id: 17934 reply_id: 68540[/import]

Thanks Peach, that worked … peachy.

I’ve noticed that sprites have a similar issue. If the number of images is even, then there is similar distortion. However, images size doesn’t seem to matter. [import]uid: 72609 topic_id: 17934 reply_id: 68589[/import]

Is there any distortion if the number of images is odd? Are you using a third party tool for sprites? (I don’t think this issue is present in the JungleScene sample code.)

Glad I could assist with the images, anyway.

Peach :slight_smile: [import]uid: 52491 topic_id: 17934 reply_id: 68598[/import]

No, an odd number of images looks ok. I’m using Paint Shop Pro version 5 to create the sheets. [import]uid: 72609 topic_id: 17934 reply_id: 68605[/import]

Wow, OK, that’s odd - the cat from jungle scene is even and last I checked it looked OK.

Are you certain each frame has an even width and height? (As opposed to odd I mean.)

Peach :slight_smile: [import]uid: 52491 topic_id: 17934 reply_id: 68696[/import]

Weird. I can’t seem to recreate the problem. I’ll let you know if it crops up again. [import]uid: 72609 topic_id: 17934 reply_id: 68990[/import]

Alright, please do.

Thanks,
Peach :slight_smile: [import]uid: 52491 topic_id: 17934 reply_id: 69068[/import]