Author Topic: Saving in FITS after saving in JPEG popup up the jpeg parameter window again  (Read 4269 times)

Offline bitli

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 513
Hello,
With version 1.4.5 (evaluation) on Vista (CH-fr) dual core 2Gb , I load a file (TIFF), do some processing, then
save in JPEG (to send by mail), went OK (I eventually disabled the warning about lost of information).
I then attempt to save in FITS (modifying the format in the 'save as' popup).

At this time, the JPEG window about compression level appears again. This seems systematic.
(I cancelled the save and saved in TIFF, this wen OK).

Thanks for you work on Pixinsight, this looks really great.

bitli

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Hi bitli,

Thank you, and welcome to PixInsight Forum.

I don't seem able to reproduce this problem on Vista x64 and XP x86. What Windows version are you using?

After selecting the FITS format on the Save As dialog, does the file name carry a .fit extension?
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
Hi Juan

I get a similar problem which is probably the same! which goes

Load fits file  ( say test) you then want to save it as a tiff file, so you go to save as and select the tiff
option and then click save ( I have not altered file name )   , it then says  test.fits already exists do you want to overwrite it even though i am trying to save as a tiff,   If I alter the file name, say to test1 it will happily save as a tiff

regards Harry
Harry Page

Offline bitli

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 513
Hi Juan, thanks for you prompt answer.

I guess the confusion is because Vista here is not set to display the file extension, and probably does not display them in the file save box.  This is combined in a maybe not totally expected behavior of the save function.

In vista 32 bits I can  reproduce it as follow:
- Open A Copy of a file wihch exists only with a single extension, say tiff (testnew.tiif)
- Save As: the name is displayed without the extension on my system
      type a new name without an extension (say blabla)
     select the type jpeg
     type record
You see the jpeg dialog and the file is saved normally.

Type save as again, you are prompt with the dialog with the original file name and original type (tiif in my case) and not the one of latest saveas, which in itself is a little bit trange but ok. The file name shows without extension on my system.

At that point if I first select the file type (FITS) then type the file new file name (blabla), I got the problem. But not if I do the operation in the other order.

The reasons seems to be that when I type the new file name, of which there is juste one (the jpeg one), windows does some autocompletion or something, see that there is a file name blabla.jpeg, and decide to change the type directly based on the extension.  This is not visible by the extension name is hidden, and because we type OK to complete the name entry, so event if the type is updated, we close the dialog before we can see the type change. Fortunately because it is jpeg it prompts witha dialog and I see that it is not the expected type.

I love completion mode but not auto-completion...

Maybe making extension visible will lower the risque of confusion? Maybe not changing the file type when the user explicitely set the type (but rather changing the extension ? May be an alert if the user request type does not match the extension type ? It seems a log of work to do for a function which should not pring any surprise.

Thanks and have a good day, I'll go back to processing the images.

bitil

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Hi bitli,

You've nailed the problem; thank you for the excellent analysis.

The problem is in hidden file extensions. Of course, we have this option disabled in all of our machines (both physical and virtual). I personally *hate* this feature; I just cannot figure out where's the point in hiding essential information about something as crucial as the name of a file... this is probably because I'm not a Windows user (and also a reason why I'm not such, probably :) ).

I'll try to devise a solution to this issue. As an alternative, you can use multiplatform file dialogs in PixInsight, instead of native file dialogs:

- Select Edit > Global Preferences.

- Select the File I/O Settings page.

- Disable the "Use native file dialogs" option.

- Click the Apply Global icon of Preferences, or press F6.

Now PixInsight will use its own, platform-independent file dialogs for all File/Open/Save As operations.

Hope this helps.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/