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 #13841 is a reply to message #13837] Tue, 29 January 2008 19:38 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
Well, the problem simply is that the image is too big Smile

If cx or cy is bigger than 2000, U++ heurestics decides that you are trying to print it. In that case, "RLE banding and rect compression" algorithm kicks in to reduce the data send to printer and also the amount of memory needed to print -> slow.

The fix is simple - specify the source rectangle. E.g.:

struct App : TopWindow {
	Image img;

	virtual void Paint(Draw& w) {
		w.DrawImage(0, 0, img, (Rect)GetSize());
	}
	
	App() {
		Sizeable().Zoomable();
	    img = StreamRaster::LoadFileAny( "e:/fax000000007.tif" );
	}
};


GUI_APP_MAIN
{
	App().Run();
}


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: Tue May 14 08:05:36 CEST 2024

Total time taken to generate the page: 0.01477 seconds