-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MIME update #18
Comments
My plan is to make a new registration for image/ktx2 with new extension and "magic". |
I would like the option for a writer to create a file with a ‘.cttf’ suffix, even though it is a subset of KTX2. Would this require a mime type to be registered also? Rationale: |
If you want browsers to be able to recognize the subset, another mime type will be required. If it's a different mime-type the underlying file may also a need different magic identifier. We should consult the IETF. |
Browsers don't care much about unknown MIME types: they will treat |
As long as .cttf aliases to ktx2, that's fine. I don't want to be adding extra MIME types if they're not required |
What is the reasoning behind adding a new extension for ktx2? I can understand maybe a separate extension as @dewilkinson points out specifically for supercompressed (though I'm not sure .cttf makes sense anymore since the glTF extension no longer calls anything cttf), but why ktx2? Is the version inside the header not enough? |
Because there are some platforms that rely entirely on file extensions to determine file type and because not every KTX loader can be relied on to support both KTX 1 and 2 given that 2 is not a superset of 1. The .cttf idea was to identify KTX2 files that contained CTTF format data. We now have Basis Universal instead of CTTF but otherwise the idea is the same. I don't think this is necessary and would cause confusion as the MIME type would be the same as general KTX2 since there is no way to register 2 mime types with the same file signature (as far as I know). |
I think this line of reasoning is true for many files with a version in the header. Some thoughts:
There is no rush for this as we can always add it later, but having a file extension that is more or less guaranteed to load on all platforms is much more compelling than a file extension that might or might not load depending on what is inside it. |
So @bghgary your recommendation is to use I need to check the ramifications of these changes on the MIME-type registration. My concern over .ktx is that KTX2 has supercompression which will require an updated security statement vs KTX 1. I suppose we can update the existing registration but I need to verify that. My concern over additional extensions is whether it is permitted for one MIME type to have multiple extensions. For glTF, isn't using the |
I'm not sure I would say that's my recommendation yet. I want to know the pros and cons of each first.
I don't have any specific need for this, but I can see the benefit of it.
Possibly. Or maybe we should wait until UASTC comes out to decide. I don't think we should do anything yet. Let's agree on .ktx vs .ktx2 first.
I'm not looking at this from a glTF perspective. I'm looking at this from a standalone .ktx (or .ktx2) file. If you try to open it in a file explorer of some kind, the question is whether it is better with (.ktx and .ktx2) or just .ktx |
This issue is a little old, but there is now an official registration.
|
Thanks for noticing this is fixed. Closing. |
As of now, IANA
image/ktx
record points here.The registration information contains 12 "magic" bytes that include KTX1 version string.
Since KTX2 uses different "magic", we need to decide:
.ktx2
) and a new MIME type (likeimage/ktx2
)or
The text was updated successfully, but these errors were encountered: