Issue saving in TIFF or JPEG

rwatters

Well-known member
Something odd (or at least it is odd to me). I find that when I open a TIFF document then make some changes and save the modified image, when I go to close the image I receive the message that the image has been modified but not saved. I check with the windows file explorer and the image has been saved ok. I also note that under the file drop down menu the 'save' selection is still illuminated which indicates that PI thinks that the edited image has not been saved (which it has). I can check the changes by opening the file and the changes have been saved ok. The same issue applies with JPEG files as well. I do NOT have this issue with XISF files. When I save an XISF file and check the file drop down menu I see that the 'save' selection is now greyed out.

To test this in a structured way, I executed the following steps for both XISF and TIFF files.

1. Using the NEW process create a new RGB image 1024 x 1024. Set all channels to 0.5 for a grey image.
2. Save image as XISF 32 bit floating point.
3. File drop down menu shows the 'save' selection as greyed out.
4. Save image as TIFF, 16 bit unsigned integer
5. Save image as XISF 32 bit floating point.
6. Open TIFF File.
7. Open Histogram Transformation tool
8. Apply stretch to both images
9. Save XISF file using FILE -> SAVE
10. 'Save' selection in file menu is greyed out
11. Save TIFF file using FILE -> SAVE
12. 'Save' selection in file menu is NOT greyed out
13. Open saved TIFF file to confirm that changes have been saved, which they are.
14. Close the edited and saved XISF file on the PI desktop. Image closes with no message received.
15. Close the edited and saved TIFF file on the PI desktop. Receive message that the image is modified but not saved.

I have attached a couple of screen shots of the PI desktop.

Any clues here would be of great assistance.

Thanks,
Rodney.
 

Attachments

  • Desktop_01_1000px.jpg
    Desktop_01_1000px.jpg
    45.1 KB · Views: 43
  • Desktop_02_1000px.jpg
    Desktop_02_1000px.jpg
    117.6 KB · Views: 51
PI doesn't consider saving an image in any other format than XISF as "really" saving the image. this is because no other file format can capture the entire state of the image - for instance no other format can remember the STF setting because that concept does not exist in any other file format. also some file formats are lossy, like JPEG, so they do not capture the true image data.

so this is normal behavior.

rob
 
Thanks Rob. I kind of had a feeling that this would be the case. I always save my files in XISF but obviously there are many times when we need to save in TIFF and JPEG for sharing with others. I note that the console does display an error message that it is saving in a 'deprecated format' when saving in anything other than XISF and I understand that because useful information will be missing from the saved file.

Having said that, to receive a message that says 'The image has been modified and is unsaved' is, if taken literally, incorrect and misleading. Whilst this is not a big deal, it could lead to confusion and may be worth considering as an enhancement to at least make the message clearer. Something along the lines of a warning message displayed on the desktop (in addition to the console) that saving in TIFF format is not ideal etc. etc.

I might just drop a note into the Wish List forum and see where it goes.

Clear skies,
Rodney.
 
Hi Rodney,

I'll copy here my answer to a similar question posted a few weeks ago:

This is normal behavior. When you save an image using a format that is not able to store or represent accurately all of the existing data and metadata in the image, its modified state is not cleared and the file path of the newly created (or overwritten) file is not associated with its image window. The purpose of this feature is to protect your data from degradation. For example, this happens when you save a 32-bit floating point image in JPEG format, which uses a lossy compression codec and can only store 8-bit integer pixels. Or if your image has properties, such as an astrometric solution, and you save it in a format different from XISF or FITS.

This feature is called strict file save mode, and is enabled by default. You can disable it with Preferences > File I/O Settings > Strict file save mode. However, disabling this option is strongly discouraged.

Having said that, to receive a message that says 'The image has been modified and is unsaved' is, if taken literally, incorrect and misleading.

The image *is* unsaved because you have used a format unable to store all of the data associated with the image, so you'll lose some data if you close it. Whether the lost data is important for you or not is a different matter, which PixInsight obviously cannot know.
 
Thanks for your prompt response Juan. Whilst I may not entirely agree with the UI in this case I understand and agree with the overall philosophy. PI is a fantastic product and I appreciate the efforts of the PI team and the supporting community.

Clear skies,
Rodney
 
Back
Top