Home » Community » Newbie corner » SaveFile progress tracking (SaveFile progress tracking with Progress dialog or ProgressIndicator)
SaveFile progress tracking [message #58282] |
Fri, 08 April 2022 20:16  |
Mountacir
Messages: 49 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!";
});
}
|
|
|
Goto Forum:
Current Time: Tue May 06 02:57:17 CEST 2025
Total time taken to generate the page: 0.01927 seconds
|