Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Slow image drawing on big images
Re: Slow image drawing on big images [message #13856 is a reply to message #13855] |
Wed, 30 January 2008 10:33 |
mdelfede
Messages: 1307 Registered: September 2007
|
Ultimate Contributor |
|
|
luzr wrote on Wed, 30 January 2008 09:01 |
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.
|
What I need is :
1-load images from a multipage tiff file
2-make some small thumbnails of it to show on left side (easy)
3-show the pages on the center, with zoom/rotate/pan ability
For the point 3, I'd rescale all the images at once on zoom request (zooms are seldom than pans), but I'd keep the original images in order to avoid multiple file loading and to not loose quality on successive rescalings. So, original images + scaled images to display them quickly + thumbnails.
The best would be a rescale that keeps the cached image up to a new rescale, but it should allow panning, so multiple partial displays of it... I don't know if CachedRescale does the job.
Ciao
Max
|
|
|
|
|
Slow image drawing on big images
By: mdelfede on Tue, 29 January 2008 14:31
|
|
|
Re: Slow image drawing on big images
By: mirek on Tue, 29 January 2008 14:35
|
|
|
Re: Slow image drawing on big images
By: mdelfede on Tue, 29 January 2008 15:03
|
|
|
Re: Slow image drawing on big images
By: mirek on Tue, 29 January 2008 19:38
|
|
|
Re: Slow image drawing on big images
By: mirek on Tue, 29 January 2008 20:04
|
|
|
Re: Slow image drawing on big images
By: mdelfede on Tue, 29 January 2008 22:27
|
|
|
Re: Slow image drawing on big images
By: mirek on Tue, 29 January 2008 22:30
|
|
|
Re: Slow image drawing on big images
By: mdelfede on Tue, 29 January 2008 23:56
|
|
|
Re: Slow image drawing on big images
By: mirek on Wed, 30 January 2008 09:01
|
|
|
Re: Slow image drawing on big images
By: mdelfede on Wed, 30 January 2008 10:33
|
Goto Forum:
Current Time: Tue May 14 17:14:32 CEST 2024
Total time taken to generate the page: 0.02287 seconds
|