Author Topic: File save as dialog bit buggy  (Read 4621 times)

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
File save as dialog bit buggy
« on: 2007 September 22 19:55:58 »
Hi,

it seems that in some cases the file name I specify in the 'save as' dialog is not actually used. Well, the first time it is but when I try to save a second file under a different name it tells me the file already exists and reports the previous name.

Weird.

I haven't tried very hard to get you a repeatable case but it seems related to having multiple files open.

I saved FITS files to TIFF format.

Oh, after saving the file (FITS modified, then saved as TIFF) it tells me file isn't saved yet if I try to close it. It shouldn't as I just saved it.

Thanks,

  Sander
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
File save as dialog bit buggy
« Reply #1 on: 2007 September 25 02:29:22 »
Hi Sander,

Quote
it seems that in some cases the file name I specify in the 'save as' dialog is not actually used. Well, the first time it is but when I try to save a second file under a different name it tells me the file already exists and reports the previous name.


There are a few issues with Qt's file dialogs that I'm working on; let's see if the next version doesn't have some of them. I think this may be the cause of this problem.

Quote
Oh, after saving the file (FITS modified, then saved as TIFF) it tells me file isn't saved yet if I try to close it. It shouldn't as I just saved it.


This is not a bug. It is the strict file save mode that PixInsight uses by default. You probably have seen a warning message on "missing format capabilities" upon saving the TIFF file. In this case, the reason is probably that the TIFF format cannot save FITS header keywords.

In strict mode, when you save an image in a format that:

* Is not able to store all existing data: ICC profile, keywords, metadata, etc.

* Cannot save images with the required data format: insufficient maximum bit depth, or not able to write floating point samples.

* Writes images using a lossy generation scheme: JPEG or lossy JPEG 2000, for example.

then the saved image does not clear its modified status. This is a security feature to prevent accidental data losses.

You can disable the strict file saving mode in Preferences, File I/O Settings section.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline David Serrano

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 503
File save as dialog bit buggy
« Reply #2 on: 2007 September 25 05:33:37 »
Quote from: "Juan Conejero"
then the saved image does not clear its modified status. This is a security feature to prevent accidental data losses.


Nice feature. I don't actually recall the content of the message box that appears when closing the image after saving it without clearing the modified status, so this message could be totally bogus but, what about telling the user that the image is indeed saved, but there are some things not saved?

I.e. replacing "About to close a modified image" with "This image has been saved in a format that blah blah, and closing it means losing some information".
--
 David Serrano

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
File save as dialog bit buggy
« Reply #3 on: 2007 September 25 05:43:37 »
Hi Juan and David,

since I saved in TIFF I thought I saved a lossless image but I forgot about the meta information. You are right to warn me about closing it. I like David's suggestion about a more specific error message but it is not a big deal. When you get around to the tutorial simply add that little step.

- load fits
- modify
- save as jpg
- try to close
- oops
- save modified fits
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity