Question

I'm working on a project where I have image views which contain text and curved lines. When the graphics are viewed on a computer they appear fine. If the app with the image view is loaded on an iPad 2, the text (font: helvetica neue italic) and hand drawn lines (from adobe illustrator) appear to have extremely rough edges.

Is there something I could do to improve the image quality so that the curved lines and italic font appear smoother?

Additional info:

Image format: .jpg

When I created the image to be displayed in the image view It was larger than the image view itself so I had to scale it to fit in the view.

Was it helpful?

Solution

The solution is simple:

  1. Use “pixel-perfect” image

Image should be same size as the image view. Because if the size does not match, the iOS will calculate the “intermediate” pixels for you. They are just approximation and blur your image.

  1. Use PNG

JPG is lossy format. Its algorithm is effective for photo but bad for text/vector shape. Because it handles badly on some sharp border. If you observe the text on JPEG, you can find some “distortion” (artifact) around them. (look 1) PNG can handle such things well. But it will increase the image size.

1: JPEG artifact

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top