Bug 60781 - Missing "image/fits" type from standard mime/file type list
Summary: Missing "image/fits" type from standard mime/file type list
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-05 08:07 UTC by Stewart Stevens
Modified: 2008-06-11 13:23 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Magic for FITS files (816 bytes, patch)
2005-07-27 00:02 UTC, Nicolas Goutte
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stewart Stevens 2003-07-05 08:07:26 UTC
Version:            (using KDE KDE 3.1.2)
Installed from:    Gentoo Packages
OS:          Linux

Files with .fits extensions get treated as though they were text. (i'm not sure why that is)
fits is an image format mostly used for astronomical images.

As far as I know the basic KDE system doesn't include any apps capable of displaying these image types but it would be nice to have the type recognised as an image at least.
Comment 1 Nicolas Goutte 2005-07-24 16:47:52 UTC
The mime type is handled by RFC 4047 which defines a application/fits too.

(Currently I am not entirely sure of the difference between the two mime types. The *.fits file name pattern seems to be linked to application/fits.)

Have a nice day!
Comment 2 Nicolas Goutte 2005-07-24 17:41:33 UTC
The mime types are now defined but not linked to the file name patterns, as both mime types share the same extension(s). Probably the magic file could help.

Have a nice day!
Comment 3 Nicolas Goutte 2005-07-24 18:07:32 UTC
Sorry it was the wrong bug number. I meant bug #60781.

On Sunday 24 July 2005 17:38, Nicolas Goutte wrote:
[bugs.kde.org quoted mail]
Comment 4 Nicolas Goutte 2005-07-24 18:15:10 UTC
There is bug #60781 asking for the FITS mime types (defined in RFC 4047).

I have now added image/fits and application/fits in kdelibs, however without 
any file extensions or magic support.

So I would need help from people really using FITS and I suppose that these 
people are the KStars developers.

Should I simply define *.fits;*.fit;*.FIT;*.fts;*..FTS; as file pattern for 
image/fits and do not care about application/fits or is this not acceptable? 

Or should we only use the magic file? But how? How useful would it be for a 
magic file to check NAXIS to be 2 or 3 in the 3rd line for a image/fits? (As 
the lines have fixed length, this should be possible to do in a magic file.)

I am not reading the kstars-devel mailing lists (sorry), so I suppose that 
this discussion should be done on the bug report: 60781@bugs.kde.org

Have a nice day!
Comment 5 Jasem Mutlaq 2005-07-25 07:49:02 UTC
>There is bug #60781 asking for the FITS mime types (defined in RFC 4047).
>
>I have now added image/fits and application/fits in kdelibs, however without
>any file extensions or magic support.
>
>So I would need help from people really using FITS and I suppose that these
>people are the KStars developers.
>
>Should I simply define *.fits;*.fit;*.FIT;*.fts;*..FTS; as file pattern for
>image/fits and do not care about application/fits or is this not acceptable?
>
>Or should we only use the magic file? But how? How useful would it be for a
>magic file to check NAXIS to be 2 or 3 in the 3rd line for a image/fits? (As
>the lines have fixed length, this should be possible to do in a magic file.)


Hi,

FITS support was added to KStars long time ago, but I didn't go a step further to add it as MIME type in KDE. can I add a switch to KStars command line arguments (e.g. kstars --fits filename.fits) or it must be something like "kstars filename.fits" ?

The pattern used in KStars is: *.fits *.fit *.fts

As for NAXIS, no need to check for it, and maybe future KStars version will support NAXIS 1 or 3.

Regards,
Jasem Mutlaq
Comment 6 Nicolas Goutte 2005-07-26 21:06:03 UTC
On Monday 25 July 2005 07:49, Jasem Mutlaq wrote:
[bugs.kde.org quoted mail]

That is independant of having a mime time or not. It depends on the Exec line 
of KStars' .desktop file.

But that probably means that you need to support "kstars filename.fits"

>
> The pattern used in KStars is: *.fits *.fit *.fts
>
> As for NAXIS, no need to check for it, and maybe future KStars version will
> support NAXIS 1 or 3.


Yes, but RFC 4047 defines two mimetypes. As they have the same extensions (and 
anyway RFC 4047 tells that many files have no extensions or non-standard 
extensions), we have to find which mime type is what, especially that I 
suppose that KStars needs images with 2 axis (o part of images/fits).

>
> Regards,
> Jasem Mutlaq


Have a nice day!
Comment 7 Nicolas Goutte 2005-07-27 00:02:22 UTC
Created attachment 11945 [details]
Magic for FITS files

This is a patch to KDE's magic file to try to support both mime types for FITS.

I could not commit it, as KDE 3.5 was branched before.

Have a nice day!
Comment 8 Pino Toscano 2008-06-11 13:23:48 UTC
KDE 3.5 is frozen for such addition, and KDE 4 uses the shared-mime-info database that includes this MIME type.