I'm using code from the Image Viewer Demo (v4.2) saveCurrentImageToolStripMenuItem_Click function to save the image file back to the source file. What is the best way to determine if the image save process has completed? I need to make sure the file save process is complete before the application moves the image file to it's final destination on the server.
If the progress value in UpdateSavingImagesProgress = 100, does that do it? I noticed that this value will hit 100 without running through the function above (for example when rotating a page) but the changes are not saved back to the source file until the code in that function is run.
Thanks,
Shane
Recommended way to determine if save is completed
Moderator: Alex
Re: Recommended way to determine if save is completed
Hello Shane,
Best regards, Alexander
100% progress means that all images from image collection were processed. You must subscribe to the ImageCollectionSaved event if you want to know when image collection was saved.If the progress value in UpdateSavingImagesProgress = 100, does that do it? I noticed that this value will hit 100 without running through the function above (for example when rotating a page) but the changes are not saved back to the source file until the code in that function is run.
Best regards, Alexander
Re: Recommended way to determine if save is completed
So I'm assuming that once that the event created by:
is raised (which finally ends up in the sub ChangeSourceStreamToSaveStream), I can safely assume the image collection is saved and the file is ready to be closed and moved.
Code: Select all
AddHandler encoder.ImageCollectionSaved, New ImageCollectionSavedEventHandler(AddressOf encoder_ImageCollectionSaved)
Re: Recommended way to determine if save is completed
Hello Shane,
Yes, file is ready to be closed and moved after the ImageCollectionSaved event.
Best regards, Alexander
Yes, file is ready to be closed and moved after the ImageCollectionSaved event.
Best regards, Alexander
Re: Recommended way to determine if save is completed
Hello,
Best regards, Alexander
What do you mean?hi,is it invalid yet:-?
Best regards, Alexander