1. 18 May, 2019 1 commit
    • Paul Eggert's avatar
      For SVG, 8192 is the new 256 · db9af103
      Paul Eggert authored
      Prefer librsvg for display of splash.svg
      When both librsvg and Imagemagick are available, Emacs should
      prefer librsvg to render SVG images.  However, Emacs was using
      Imagemagick to render its own splash.svg file because
      image-type-from-file-header returned nil for that file.
      * lisp/image.el (image-type-from-buffer)
      (image-type-from-file-header): Look at the first 8192 bytes of
      the image, not just the first 256.  For Emacs’s own splash.svg
      file, image-type-header-regexps needs to look at 939 bytes.
      8192 bytes is a reasonable number nowadays given typical file
      system design.
      * test/lisp/image-tests.el (image-tests--emacs-images-directory):
      New contant.
      (image-type-from-file-header-test): New test.
  2. 18 Apr, 2019 1 commit
    • Basil L. Contovounesios's avatar
      Fix off-by-one-link error in image--set-property · a4ad7bed
      Basil L. Contovounesios authored
      * lisp/image.el (image--set-property): Ensure new value is set even
      in the unlikely case that the plist is empty.  Fix off-by-one-link
      error when deleting a property. (bug#35285)
      * test/lisp/image-tests.el: New file.
      (image--set-property): New test.