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 » Community » Newbie corner » SaveFile progress tracking (SaveFile progress tracking with Progress dialog or ProgressIndicator)
icon3.gif  SaveFile progress tracking [message #58282] Fri, 08 April 2022 20:16 Go to previous message
Mountacir is currently offline  Mountacir
Messages: 45
Registered: November 2021
Member
Hello,

How to track the progress of SaveFile with Progress dialog or ProgressIndicator?
I have this big image that takes a couple of seconds to save, I couldn't figure out how to show it's progress.
Any help is appreciated. Thanks!


void Test::ImgSave(){
	
	fsn.DefaultExt("png");
	if(!fsn.ExecuteSaveAs()) return;
	String fn = fsn;
	int w = 10000;
	int h = 10000;
	
	work.Run([=] {
		
		ImageDraw dw(w, h);
		dw.DrawRect(0, 0, w, h, White());        
		ImageBuffer img(dw);
		img.SetDPI(Size(300,300));
		PNGEncoder encoder;

		encoder.SaveFile ( fn, img ); //How to track progress of this?
		
		GuiLock __;
		statusbar = "Saved!";
	});
	
}

 
Read Message icon3.gif
Read Message
Previous Topic: Need pointers for USB HID
Next Topic: Customization of TheIDE (PLUGIN)
Goto Forum:
  


Current Time: Sun Apr 28 22:26:17 CEST 2024

Total time taken to generate the page: 0.04789 seconds