No Indicator while Saving is in Progress ?

Ideas for improvements and requests for new features in XnView MP

Moderators: helmut, XnTriq, xnview

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

No Indicator while Saving is in Progress ?

Post by quapurna »

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
.
User avatar
budz45
XnThusiast
Posts: 1621
Joined: Sun Jun 03, 2007 6:05 pm
Location: UK

Re: No Indicator while Saving is in Progress ?

Post by budz45 »

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
User avatar
m.Th.
XnThusiast
Posts: 1676
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: No Indicator while Saving is in Progress ?

Post by m.Th. »

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.

- Dark Themed XnViewMP 1.7.1 64bit on Win11 x64 -
User avatar
budz45
XnThusiast
Posts: 1621
Joined: Sun Jun 03, 2007 6:05 pm
Location: UK

Re: No Indicator while Saving is in Progress ?

Post by budz45 »

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
xnconvert progress conversion 2013-08-08_015054.jpg (34.66 KiB) Viewed 2246 times
All My Topics || my 'MP' Topics
My own Bookmarked topics--->for me only
User avatar
m.Th.
XnThusiast
Posts: 1676
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: No Indicator while Saving is in Progress ?

Post by m.Th. »

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.

- Dark Themed XnViewMP 1.7.1 64bit on Win11 x64 -
User avatar
JohnFredC
XnThusiast
Posts: 2010
Joined: Wed Mar 17, 2004 8:33 pm
Location: Sarasota Florida

Re: No Indicator while Saving is in Progress ?

Post by JohnFredC »

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
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: No Indicator while Saving is in Progress ?

Post by XnTriq »

JohnFredC wrote:#2 (aka a "throbber") was discussed here some years ago.
On Halloween of 2010, to be exact (-;
User avatar
budz45
XnThusiast
Posts: 1621
Joined: Sun Jun 03, 2007 6:05 pm
Location: UK

Re: No Indicator while Saving is in Progress ?

Post by budz45 »

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: :D
throbXN000923.png
throbXN000923.png (3.76 KiB) Viewed 2201 times
All My Topics || my 'MP' Topics
My own Bookmarked topics--->for me only
quapurna
Posts: 135
Joined: Wed Jun 12, 2013 4:55 pm
Location: earth (the not-flat one)

Re: No Indicator while Saving is in Progress ?

Post by quapurna »

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
XnViewMP-Save-Indicator.png (8.43 KiB) Viewed 2197 times
Or, XnViewMP displays its small internal-image during the save process. So, this 'indicator' is the same for any OS.
XnViewMP-saving.png
XnViewMP-saving.png (1.36 KiB) Viewed 2177 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
.
User avatar
m.Th.
XnThusiast
Posts: 1676
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: No Indicator while Saving is in Progress ?

Post by m.Th. »

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.

- Dark Themed XnViewMP 1.7.1 64bit on Win11 x64 -
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: No Indicator while Saving is in Progress ?

Post by XnTriq »

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)...
User avatar
m.Th.
XnThusiast
Posts: 1676
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: No Indicator while Saving is in Progress ?

Post by m.Th. »

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

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.

- Dark Themed XnViewMP 1.7.1 64bit on Win11 x64 -
User avatar
XnTriq
Moderator & Librarian
Posts: 6512
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: No Indicator while Saving is in Progress ?

Post by XnTriq »

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 |-:
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: No Indicator while Saving is in Progress ?

Post by xnview »

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

Re: No Indicator while Saving is in Progress ?

Post by quapurna »

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