Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Slow image drawing on big images
Re: Slow image drawing on big images [message #13855 is a reply to message #13852] Wed, 30 January 2008 09:01 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
mdelfede wrote on Tue, 29 January 2008 17:56

WOW, that was a great speed improvement !
Thanx ! Smile

Max

EDIT : I need also to implement ZOOM, PAN and a multipage interface. For PAN, no problem, I can derive from ImageCtrl.
Regarding ZOOM I wonder if there's not a fastest way than rescaling the image on the fly.... Does the main image paint code provide some stuff for resizing image on the fly, maybe with help of native code ?
For the multipage stuff I'll look tomorrow on Raster code.

Ciao

Max



IMO, forget about ImageCtrl. It was not designed for this purpose and it is about 20 lines anyway. Roll your own widget.

For zooming, just use Rescale, it is close to perfect. Also, you might prefer cached variant, use

Image CachedRescale(const Image& m, Size sz, const Rect& src);

or

Image CachedRescalePaintOnly(const Image& m, Size sz, const Rect& src);

PaintOnly means that you do not intent to access the pixel matrix anymore; Draw is then allowed to free the memory. "Cached" means you can call this function in Paint routine; if source parameters do not change, Image is restored from the cache.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Image into a polimorphic array
Next Topic: Alpha channel in raster images
Goto Forum:
  


Current Time: Fri Jun 07 14:17:17 CEST 2024

Total time taken to generate the page: 0.02466 seconds