Zoom in an image with out loosing text resolution

1.9k views Asked by At

I want to implement an application like "The star Epaper" available on Android and Apple Markets. This app is pretty amazing: it uses an small images but if u pinch this image, the quality of texts never change. It means by zoom in or zoom out the quality of image is still same. I went to files of app and found that there is a jpg image ( i.e. 183 KB) and each image has another file "22 KB" with no-extension. I used openwith and found that this file is also an image. Therefore, This app is using both of these images ( maybe one of the is vector) to replace the good quality for text file whenever pinch event fired.

What is this technique ? and how to implement it?

1

There are 1 answers

2
umlum On

Correct, you need a file format that stores text as vector graphics. For example .pdf or .svg. You can display such files using WebView on Android or UIWebView on iOS.

If you want more control, you can also implement your own view with zoom behavior. At each zoom level, you scale the text and render it again using the operating system's drawing API. There won't be any jaggies.

If you don't want to use web views, and don't want to do everything yourself either, look around SO: .svg libraries have been covered for example