diff options
author | Alan Third <alan@idiocy.org> | 2021-11-26 12:54:07 +0000 |
---|---|---|
committer | Alan Third <alan@idiocy.org> | 2021-12-22 20:48:19 +0000 |
commit | ec1312d76a6bb9b4011ab66adad1614a31747af8 (patch) | |
tree | 1c66b5c6d0ce11638edc363a372ade5ba8500d33 /lisp/image.el | |
parent | ab0d7a2b83fbb97788efb3ad1cd5e3b0ed10f7f4 (diff) | |
download | emacs-ec1312d76a6bb9b4011ab66adad1614a31747af8.tar.gz emacs-ec1312d76a6bb9b4011ab66adad1614a31747af8.tar.bz2 emacs-ec1312d76a6bb9b4011ab66adad1614a31747af8.zip |
Add native HEIC support on macOS (bug#51381)
* lisp/image.el (image-type-header-regexps):
(image-type-file-name-regexps):
(image-type-auto-detectable): Add auto-detect code for heic.
* src/image.c (syms_of_image): Add heic as an image type under NS.
* src/nsimage.m (ns_can_use_native_image_api): Add heic to list of
possible image types in the native image support lookup.
Diffstat (limited to 'lisp/image.el')
-rw-r--r-- | lisp/image.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/image.el b/lisp/image.el index cedefc038f0..702985f41ff 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -58,7 +58,7 @@ static \\(unsigned \\)?char \\1_bits" . xbm) "\\(?:!DOCTYPE[ \t\r\n]+[^>]*>[ \t\r\n]*<[ \t\r\n]*" comment-re "*\\)?" "[Ss][Vv][Gg]")) . svg) - ) + ("\\`....ftyp\\(heic\\|heix\\|hevc\\|heim\\|heis\\|hevm\\|hevs\\|mif1\\|msf1\\)" . heic)) "Alist of (REGEXP . IMAGE-TYPE) pairs used to auto-detect image types. When the first bytes of an image file match REGEXP, it is assumed to be of image type IMAGE-TYPE if IMAGE-TYPE is a symbol. If not a symbol, @@ -78,7 +78,7 @@ a non-nil value, TYPE is the image's type.") ("\\.ps\\'" . postscript) ("\\.tiff?\\'" . tiff) ("\\.svgz?\\'" . svg) - ) + ("\\.hei[cf]s?\\'" . heic)) "Alist of (REGEXP . IMAGE-TYPE) pairs used to identify image files. When the name of an image file match REGEXP, it is assumed to be of image type IMAGE-TYPE.") @@ -97,7 +97,8 @@ be of image type IMAGE-TYPE.") (tiff . maybe) (svg . maybe) (webp . maybe) - (postscript . nil)) + (postscript . nil) + (heic . maybe)) "Alist of (IMAGE-TYPE . AUTODETECT) pairs used to auto-detect image files. \(See `image-type-auto-detected-p'). |