The attached patch
Created attachment 129082 [details] [review] patch (Hit enter too soon, sorry about that) The attached patch adds a mimetype for Khronos texture files (image/ktx). It includes a test file from the SDK. https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/#mimeregistration
Please add a link to: https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/#5 in the commit message, as that's where the mime-type itself comes from. However, this page only mentions one magic. Where are the others coming from?
(In reply to Bastien Nocera from comment #2) > Please add a link to: > https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/#5 > in the commit message, as that's where the mime-type itself comes from. Will do. > However, this page only mentions one magic. Where are the others coming from? It's one 12 byte magic, split into three 32-bit values. I tried entering it as a string, but the escaped non-ascii characters are converted to UTF8 so that doesn't work. The ^Z character is also not a valid xmlChar.
(In reply to Fredrik Höglund from comment #3) > (In reply to Bastien Nocera from comment #2) > > Please add a link to: > > https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/#5 > > in the commit message, as that's where the mime-type itself comes from. > > Will do. > > > However, this page only mentions one magic. Where are the others coming from? > > It's one 12 byte magic, split into three 32-bit values. I tried entering it > as a string, but the escaped non-ascii characters are converted to UTF8 so > that doesn't work. The ^Z character is also not a valid xmlChar. I missed the offsets. But that's the wrong check. You're checking for this at offset 0, *or* that at offset 4, etc. I've fixed it up. commit 1e44ab018eb75c82fa8b870a861d30cc603f1423 Author: Fredrik Höglund <fredrik@kde.org> Date: Sat Jan 21 16:33:12 2017 +0100 Add a mimetype for Khronos texture files As defined at: https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/#5 https://bugs.freedesktop.org/show_bug.cgi?id=99483
Created attachment 129086 [details] [review] patch v2
Thanks. I missed that part of the spec.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.