U++ framework
Do not panic. Ask here before giving up.

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: 14291
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: Wed Jul 22 22:08:20 GMT+2 2026

Total time taken to generate the page: 0.00583 seconds