• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Rendering Large Images Fast

 
Lambert Stein
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to develop an application for use on cell phones that will be able to render a large image fast. By large, I mean something like a 40 MB PNG file that represents a map of an area, something around 18000x15000 pixels. This is even slow on a modern computer if done incorrectly (Photoshop is one of the few programs that can render such images fast), so I need to find a way to quickly paint the portion of the image that the user needs to see, with no more resolution or area than needed. (This may involve cropping and then converting the image to a bitmap of the needed size, but the issue here is a speed that the user can bear to live with.) I'm not sure where to start, since the Graphics API doesn't seem to be capable of doing this... can anybody help?

Thank you!
 
Alexander Ponomarev
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may use quadtree to store images. Images must be dynamically loaded from rms or filesystem as they are painted. On the most phones you can keep in ram some 500 x 500 px image. So the resolution would be to crop your image on many 50 x 50 parts and put them in quadtree. If you can't find quadtree implementation i could share the one i used if you need it.
I had the very same problem some time ago, i resolved it in this way.
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's an open-source web server product called Ka-Maps! that can tile like Google Maps does. It includes a "zoom" facility and a set of caches. No special code is required in the client other than basic JavcaScript capabilities.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic