## No Indicator while Saving is in Progress ?

Ideas for improvements and requests for new features in XnView MP

Moderators: XnTriq, xnview

quapurna
Posts: 134
Joined: Wed Jun 12, 2013 4:55 pm
Location: earth (the not-flat one)

### No Indicator while Saving is in Progress ?

Halo.

As I mentioned in other thread, I use XnViewMP to read large images (screenshots of complete html pages).
It is very often that I crop those images to remove the useless parts; the left and right parts of image to get the frame in the middle. Then, I save the image.

Can XnViewMP pop-up a small window saying that the saving is in progress ?
The only 'indicator' I see is the "Save" button on the toolbar which is remained in 'pushed' state while XnViewMP is saving the image.
What if a user does not have Save button on toolbar; they use Ctrl+S. What saving-indicator that user can see ?

Thank you
.

budz45
XnThusiast
Posts: 1597
Joined: Sun Jun 03, 2007 6:05 pm
Location: UK

### Re: No Indicator while Saving is in Progress ?

A Progress bar would be better (like in XnConvert) The progress bar could appear in XnViewMP's status bar
All My Topics || my 'MP' Topics
My own Bookmarked topics--->for me only

m.Th.
XnThusiast
Posts: 1583
Joined: Wed Aug 16, 2006 6:31 am
Contact:

### Re: No Indicator while Saving is in Progress ?

budz45 wrote:A Progress bar would be better (like in XnConvert) The progress bar could appear in XnViewMP's status bar
The progress is already there. It is used when XnV-MP builds the thumbnails.

...however it could be very problematic to implement it.

AFAIS the save is implemented in one atomic command which is independent from XnView.

Most probably, Pierre has a library/package/unit which does the "save" (ok, the IO subsystem) which is called from XnView - something like this: DoSave(myCurrentPicture, fmtJPEG, 'C:\foo\bar.jpg');

In order to add a progress bar to this he needs to implement a callback function which should be fired from the IO subsystem... when??

...because this callback should be called in a more-or-less consistent way down to each encoding engine for each file format (many of them being composed from code which aren't Pierre's work) like a 'pulse' during the saving process in order to give the user the metaphor of saving progress. Or, if Pierre prepares the file in memory and after that streams the prepared thing to the disk it should be somewhat easier to do it.

Also, a change in interface by adding a callback (if it isn't already there) in such a low-level layer could generate an avalanche of incompatibilities, bugs etc.

Photoshop CS6 has something similar but I'm not very satisfied how they implemented it.

Much more easier is to write something on the status bar like most programs do. Something like:

Code: Select all

myStatusBar.Text = 'Saving...'; //- inform the user
Application.ProcessMessages; // allow the GUI to repaint itself
DoSave(...); // do the main job
myStatusBar.Text = ''; //- clear the text
m. Th.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

budz45
XnThusiast
Posts: 1597
Joined: Sun Jun 03, 2007 6:05 pm
Location: UK

### Re: No Indicator while Saving is in Progress ?

m.Th. wrote: The progress is already there. It is used when XnV-MP builds the thumbnails.
Well I mean a progress is needed for View mode

....A small 170 pixel width progress could display in the View mode status bar on XnViewMP for when saving changes to any/larger images file sizes.

In latest web browsers like Firefox and Chrome there status bar's are hidden, so when a user hovers over a link on any web page then the url to that link shows as a pop-up in the status bar area of these modern web browsers....So it would be cool if XnViewMP View mode would use this same style pop up style for a progress bar indicator during saving of image files

It would be a native themed progress bar (open full sized attached image)
xnconvert progress conversion 2013-08-08_015054.jpg (34.66 KiB) Viewed 1577 times
All My Topics || my 'MP' Topics
My own Bookmarked topics--->for me only

m.Th.
XnThusiast
Posts: 1583
Joined: Wed Aug 16, 2006 6:31 am
Contact:

### Re: No Indicator while Saving is in Progress ?

Well I mean a progress is needed for View mode
Yeah, ok ...sorry for that. Also, the popup idea is nice.

However, the main problem remains: the Save method is a different black box for each format.

Pierre must change the code which writes TIF, JPG, PNG, WebP ...and all the other 500 (?) formats in order to get this. Also, for each format he must know when he has done 25, 60, 75% (etc.) of saving.

Or, otherwise he has two choices:

1. (As I said in my prev. post) write in a (popup) status bar something like 'Saving...' (or 'Loading...' for Open operations)

- and/or -

2. Show a cycling (indeterminate, bouncing) gauge

...of course (as I said - again) he can 'save' (ok, prepare) the file in memory and after that show the 'progress bar' on the disk write. But this can be memory consuming (the entire file is in memory).
m. Th.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

JohnFredC
XnThusiast
Posts: 2010
Joined: Wed Mar 17, 2004 8:33 pm
Location: Sarasota Florida

### Re: No Indicator while Saving is in Progress ?

This has been a persistent topic.

#2 (aka a "throbber") was discussed here some years ago.

It seems the simplest solution with the most "bang for the buck".
John

XnTriq
Moderator & Librarian
Posts: 5575
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

### Re: No Indicator while Saving is in Progress ?

JohnFredC wrote:#2 (aka a "throbber") was discussed here some years ago.
On Halloween of 2010, to be exact (-;

budz45
XnThusiast
Posts: 1597
Joined: Sun Jun 03, 2007 6:05 pm
Location: UK

### Re: No Indicator while Saving is in Progress ?

for View mode it should just appear on the status bar during saving of images (especially larger file-size images)

a very small one, native UI, like this:
throbXN000923.png (3.76 KiB) Viewed 1532 times
All My Topics || my 'MP' Topics
My own Bookmarked topics--->for me only

quapurna
Posts: 134
Joined: Wed Jun 12, 2013 4:55 pm
Location: earth (the not-flat one)

### Re: No Indicator while Saving is in Progress ?

Halo, ALL.

Actually, I do not expect the detail of progress such as 10%, 15%, 20% and so on, the name of image, etc.
I just want to see a simple indicator such as a small pop-up window. That is all. After it disappears, I can confidently make the next action such go to the next image, or even do cropping again (after saving the first session of cropping), etc.

Please, note that I (perhaps, some other users too) like using full screen while doing the cropping. I have set the keyboard buttons for my own purpose, such "a, c, s" for "Select All, Crop, Save", respectively.
When XnViewMP is in full-screen mode, users may hide the title-bar and status-bar.

Is it technically complicated to make a small window (saying "Saving") appear during the save process?
XnViewMP-Save-Indicator.png (8.43 KiB) Viewed 1528 times
Or, XnViewMP displays its small internal-image during the save process. So, this 'indicator' is the same for any OS.
XnViewMP-saving.png (1.36 KiB) Viewed 1508 times
With this kind of small-image pop-up as the indicator, we can expect another option such as "Use Simple Indicators" for any process that triggers an indicator such as "Rebuilding Thumbnails", etc. Again, please note that users may hide the Status-Bar.

Thanks
.

m.Th.
XnThusiast
Posts: 1583
Joined: Wed Aug 16, 2006 6:31 am
Contact:

### Re: No Indicator while Saving is in Progress ?

Actually, I do not expect the detail of progress...
Actually, I do NOT expect anything of these.

What I expect is to have the save done in 0 (zero) secs!

IOW I think that the best solution would be background save a la Photoshop CS6

When the user presses the Save (As...) - then:

1. Make a (temporary) memory snapshot/copy of the image to be saved
2. Create a thread to save in background the snapshot (the thread will have two arguments: the file name and a pointer to the snapshot). This thread will look if there is/are another Save threads still running and wait for them. At the end, before it dies, the thread will destroy the snapshot also.
3. Immediately return the control to program

- if the user tries to close the program (NOT the image) then the program will look if there are any Save threads still running and wait for them (and when the threads are done then the program will close).
m. Th.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

XnTriq
Moderator & Librarian
Posts: 5575
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

### Re: No Indicator while Saving is in Progress ?

m.Th. wrote:if the user tries to close the program (NOT the image) then the program will look if there are any Save threads still running and wait for them (and when the threads are done then the program will close).
I was assuming that XnView already works this way, but there's this bug report:
JohnFredC ([url=http://newsgroup.xnview.com/viewtopic.php?p=18505#p18505]Saving of big pictures (PNG) can be buggy (loading too)[/url]) wrote:I too find that XNView (all recent versions) occasionally crashes when saving very large PNGs. I find it happens most often (which isn't "very" often.. more like rarely) if I attempt to close XNView before saving is complete AND the PNG is very large (~100Mb or more)...

m.Th.
XnThusiast
Posts: 1583
Joined: Wed Aug 16, 2006 6:31 am
Contact:

### Re: No Indicator while Saving is in Progress ?

I was assuming that XnView already works this way...

IF XnView already supports background saving (albeit with some bugs which you spotted), then why the OP requested a popup/status bar/throbber/whatever???

Being a non-blocking action, I hardly see a need for User-side info on this...
m. Th.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

XnTriq
Moderator & Librarian
Posts: 5575
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

### Re: No Indicator while Saving is in Progress ?

m.Th. wrote:IF XnView already supports background saving (albeit with some bugs which you spotted), then why the OP requested a popup/status bar/throbber/whatever???
Sorry, I should've been more clear. What I meant to say was, that moi (non-programmer) used to believe (past tense) that “save routines” in every application — be it image editor or text editor or what have you — by default behave the way you describe in part 2 of your previous post. Obviously, that was a naïve assumption on my part |-:

xnview
Author of XnView
Posts: 33425
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

### Re: No Indicator while Saving is in Progress ?

Pierre.

quapurna
Posts: 134
Joined: Wed Jun 12, 2013 4:55 pm
Location: earth (the not-flat one)

### Re: No Indicator while Saving is in Progress ?

xnview wrote:Issue 29
Thank you. I didn't know MantisBT has been used.