Open KOLANICH opened 5 years ago
Regarding application
: as far as I know, icns icons are only used on macOS. On other Apple systems (iOS, watchOS, tvOS), multi-resolution icons are stored as individual image files or in an asset catalog (a .car file). So I think it would make more sense to list only "Apple macOS" as the application
and remove "Apple" from the list.
Also I see you've added a uti
key under xref
. Has this key been used elsewhere before and/or is it documented somewhere? I'm asking because I also thought about adding UTIs to Kaitai Struct specs, but I wasn't sure if they were notable/widespread enough (as far as I know, UTIs are only used on Apple systems).
I'm also wondering where the MIME type image/icns
comes from. On my macOS 10.14 system, according to the CoreServices APIs, the UTI for ICNS files only has a file extension registered, but no MIME type:
import CoreServices
import Foundation
debugPrint(UTTypeCopyAllTagsWithClass(kUTTypeAppleICNS, kUTTagClassFilenameExtension)!.takeRetainedValue())
// <__NSSingleObjectArrayI 0x10010ede0>(
// icns
// )
debugPrint(UTTypeCopyAllTagsWithClass(kUTTypeAppleICNS, kUTTagClassMIMEType))
// nil
And according to file --mime-type
, the MIME type is image/x-icns
:
$ file --mime-type /Applications/TextEdit.app/Contents/Resources/Edit.icns
/Applications/TextEdit.app/Contents/Resources/Edit.icns: image/x-icns
ICNS was added to the file
database in https://github.com/file/file/commit/a08d0291268365d50bea9a8a92f00a37b7c626b1, but I'm not sure where the information on the MIME type comes from.
Also I see you've added a uti key under xref. Has this key been used elsewhere before and/or is it documented somewhere?
AFAIK, no.
I'm also wondering where the MIME type image/icns comes from.
Just googling. That mime type is not official and not widely adopeted. Though neither image/x-icns
. Just selected the one most frequently seen on the first Google results page. BTW, x-
prefixes are deprecated.
I'm currently working on a spec for this format and will make a PR when it's ready.