Bug 106691

Summary: Add mime-type for HEIF images.
Product: shared-mime-info Reporter: Joachim Bauch <bauch>
Component: freedesktop.org.xmlAssignee: Shared Mime Info group <shared_mime_info>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: bugzilla
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch adding imge/heif with glob patterns and aliases.
Updated patch with acronym, expanded-acronym and tests.
Example file 1
Example file 2
Add mime-type for HEIF images

Description Joachim Bauch 2018-05-28 14:31:04 UTC
Created attachment 139815 [details] [review]
Patch adding imge/heif with glob patterns and aliases.

HEIF images are defined by MPEG-H Part 12 (ISO/IEC 23008-12), see https://en.wikipedia.org/wiki/High_Efficiency_Image_File_Format for further information on the file format.
Comment 1 Bastien Nocera 2018-05-28 15:08:51 UTC
Comment on attachment 139815 [details] [review]
Patch adding imge/heif with glob patterns and aliases.

Review of attachment 139815 [details] [review]:
-----------------------------------------------------------------

Please follow the instructions in the HACKING file to provide a test case, and make sure the XML matches the DTD.

::: freedesktop.org.xml.in
@@ +4511,5 @@
>      </magic>
>      <glob pattern="*.gif"/>
>    </mime-type>
> +  <mime-type type="image/heif">
> +    <_comment>HEIF image</_comment>

You're missing the acronym and expanded acronym elements.
Comment 2 Joachim Bauch 2018-05-29 10:57:49 UTC
Created attachment 139825 [details] [review]
Updated patch with acronym, expanded-acronym and tests.
Comment 3 Joachim Bauch 2018-05-29 10:58:19 UTC
Created attachment 139826 [details]
Example file 1
Comment 4 Joachim Bauch 2018-05-29 10:58:42 UTC
Created attachment 139827 [details]
Example file 2
Comment 5 Joachim Bauch 2018-05-29 11:01:32 UTC
(In reply to Bastien Nocera from comment #1)
> Comment on attachment 139815 [details] [review] [review]
> Patch adding imge/heif with glob patterns and aliases.
> 
> Review of attachment 139815 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> Please follow the instructions in the HACKING file to provide a test case,
> and make sure the XML matches the DTD.

Thanks for your review, I updated the patch to also contain test cases and uploaded the two files for the test. The XML matches the DTD - I think this is checked by the tests already.

> ::: freedesktop.org.xml.in
> @@ +4511,5 @@
> >      </magic>
> >      <glob pattern="*.gif"/>
> >    </mime-type>
> > +  <mime-type type="image/heif">
> > +    <_comment>HEIF image</_comment>
> 
> You're missing the acronym and expanded acronym elements.

Sorry for not adding them. I based my new entry on "image/gif" which also doesn't specify them for "GIF". Anyway, would probably be good to mention "acronym" and "expanded-acronym" somewhere if they are required.
Comment 6 Bastien Nocera 2018-05-29 11:20:06 UTC
(In reply to Joachim Bauch from comment #5)
> Sorry for not adding them. I based my new entry on "image/gif" which also
> doesn't specify them for "GIF". Anyway, would probably be good to mention
> "acronym" and "expanded-acronym" somewhere if they are required.

We also mention that you should submit the patches in git format, so that I don't need to spend 10 minutes truncating the test files, adding them to the commit and writing a commit message :)

We don't usually add acronyms for well-known data types, and some types that were added more than 10 years ago also don't have them.
Comment 7 Bastien Nocera 2018-05-29 11:20:23 UTC
Created attachment 139829 [details] [review]
Add mime-type for HEIF images
Comment 8 Bastien Nocera 2018-05-29 11:21:45 UTC
Attachment 139829 [details] pushed as d7ba16d - Add mime-type for HEIF images
Comment 9 Joachim Bauch 2018-05-29 11:45:12 UTC
(In reply to Bastien Nocera from comment #6)
> We also mention that you should submit the patches in git format, so that I
> don't need to spend 10 minutes truncating the test files, adding them to the
> commit and writing a commit message :)

Thanks for merging this so quickly despite my bad-quality patch! I will try to submit better patches in the future.
Comment 10 Bastien Nocera 2018-05-29 11:48:08 UTC
(In reply to Joachim Bauch from comment #9)
> (In reply to Bastien Nocera from comment #6)
> > We also mention that you should submit the patches in git format, so that I
> > don't need to spend 10 minutes truncating the test files, adding them to the
> > commit and writing a commit message :)
> 
> Thanks for merging this so quickly despite my bad-quality patch! I will try
> to submit better patches in the future.

It really wasn't that bad ;)

Thanks for updating the patch quickly :)

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.