* doc/lispref/display.texi (Defining Images): Document it.
* lisp/image.el (convert-images-externally): New variable.
(image-type): Use it.
(create-image): Convert images.
* lisp/image/image-converter.el (image-converter--convert): New file.
* lisp/image.el (image-rotate): Extend with an optional argument
specifying the rotation in degrees (bug#35421).
* doc/lispref/display.texi (Showing Images):
* etc/NEWS: Document the change.
* test/lisp/image-tests.el (image-rotate): New test.
* lisp/image.el (image--get-imagemagick-and-warn): Only fallback to
ImageMagick if native transforms aren't available.
* src/dispextern.h (INIT_MATRIX, COPY_MATRIX, MULT_MATRICES): New
macros for matrix manipulation.
(HAVE_NATIVE_SCALING, HAVE_NATIVE_TRANSFORMS): Rename and change all
relevant locations.
* src/image.c (x_set_image_rotation):
(x_set_transform): New functions.
(x_set_image_size): Use transform matrix for resizing under X and NS.
(x_set_image_crop): New function.
(lookup_image): Use the new transform functions.
(Fimage_scaling_p, Fimage_transforms_p): Rename and update all
callers.
* src/nsimage.m (ns_load_image): Remove rotation code.
(ns_image_set_transform): New function.
([EmacsImage dealloc]): Release the saved transform.
([EmacsImage rotate:]): Remove unneeded method.
([EmacsImage setTransform:]): New method.
* src/nsterm.h (EmacsImage): Add transform property and update method
definitions.
* src/nsterm.m (ns_dumpglyphs_image): Use the transform to draw the
image correctly.
* src/xterm.c (x_composite_image): Use PictOpSrc as we don't care
about alpha values here.
* doc/lispref/display.texi (Image Descriptors): Add :rotation.
(ImageMagick Images): Remove :rotation.
Restore lines saying "Maintainer: emacs-devel@gnu.org" when there is
no special maintainer for a file. Although this wasn't documented
it was common practice and removing the lines didn't have consensus.
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.
* 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.
It seems that .art files can be non-image files that
ImageMagick mistakenly treats as extremely large images.
Real .art images seem rare.
* lisp/image.el (imagemagick-enabled-types): Remove ART. (Bug#22289)
b94d767 (origin/emacs-26) Minor copyedits in last manual change
73508e6 Improve documentation of face numbers
bf235ce * doc/emacs/custom.texi (Authentication): Refer to the "Help ...
ceccb3c New node Authentication in the Emacs manual
9078f34 Fix a loop in c-fl-decl-start. This fixes bug #34186.
a177fe7 Fix LaTeX output of month and day from cal-tex.el
90177d7 Avoid elisp crash for OpenPGP User IDs with no e-mail address
68e55a0 image-mode: Do not use default scaling (bug#33990)
b6c762a create-image: Expand documentation (bug#33990)
928d342 Improve documentation of 'isearch-filter-predicate'
9034dd6 Fix cursor column positioning on Grep hits
# Conflicts:
# doc/emacs/custom.texi
* configure.ac: Test for XRender outside of xft checks.
* src/Makefile.in (XRENDER_LIBS): List XRender libs separately from
xft libs.
* lisp/image.el (image--get-imagemagick-and-warn): Allow resizing if
native scaling is available.
* src/dispextern.h: Add XRender and image scaling stuff.
(struct image): Add XRender Pictures.
* src/image.c (x_create_bitmap_mask):
(image_create_x_image_and_pixmap): Handle XRender Picture.
(scale_image_size):
(compute_image_size): Make available when any form of scaling is
enabled.
(x_set_image_size): New function.
(lookup_image): Set image size.
(x_create_x_image_and_pixmap): Create XRender Picture when necessary.
(x_put_x_image): Handle the case where desired size != actual size.
(free_image): Free XRender Pictures.
(Fimage_scaling_p): New function.
(syms_of_image): Add image-scaling-p.
* src/nsimage.m (ns_load_image): Remove NS specific resizing.
([EmacsImage setSizeFromSpec:]): Remove method.
(ns_image_set_size): New function.
* src/nsterm.m (ns_draw_fringe_bitmap): Cocoa and GNUstep both have
the same compositing functions, so remove unnecessary difference.
* src/xterm.c (x_composite_image): New function.
(x_draw_image_foreground): Use new x_composite_image function.
* doc/lispref/display.texi (Image Descriptors): Document
image-scaling-p and add resizing descriptors.
(ImageMagick Images): Remove resizing descriptors.
I audited use of lsh in the Lisp source code, and fixed the
glitches that I found. While I was at it, I replaced uses of lsh
with ash when either will do. Replacement is OK when either
argument is known to be nonnegative, or when only the low-order
bits of the result matter, and is a (minor) win since ash is a bit
more solid than lsh nowadays, and is a bit faster.
* lisp/calc/calc-ext.el (math-check-fixnum):
Prefer most-positive-fixnum to (lsh -1 -1).
* lisp/vc/vc-hg.el (vc-hg-state-fast): When testing fixnum width,
prefer (zerop (ash most-positive-fixnum -32)) to (zerop (lsh -1
32)) (Bug#32485#11).
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode):
Tighten sanity-check for bytecode overflow, by checking that the
result of (ash pc -8) is nonnegative. Formerly this check was not
needed since lsh was used and the number overflowed differently.
* lisp/net/dns.el (dns-write): Fix some obvious sign typos in
shift counts. Evidently this part of the code has never been
exercised.
* lisp/progmodes/hideif.el (hif-shiftleft, hif-shiftright):
* lisp/term/common-win.el (x-setup-function-keys):
Simplify.
* admin/unidata/unidata-gen.el, admin/unidata/uvs.el:
* doc/lispref/keymaps.texi, doc/lispref/syntax.texi:
* doc/misc/calc.texi, doc/misc/cl.texi, etc/NEWS.19:
* lisp/arc-mode.el, lisp/calc/calc-bin.el, lisp/calc/calc-comb.el:
* lisp/calc/calc-ext.el, lisp/calc/calc-math.el:
* lisp/cedet/semantic/wisent/comp.el, lisp/composite.el:
* lisp/disp-table.el, lisp/dos-fns.el, lisp/edmacro.el:
* lisp/emacs-lisp/bindat.el, lisp/emacs-lisp/byte-opt.el:
* lisp/emacs-lisp/bytecomp.el, lisp/emacs-lisp/cl-extra.el:
* lisp/erc/erc-dcc.el, lisp/facemenu.el, lisp/gnus/message.el:
* lisp/gnus/nndoc.el, lisp/gnus/nnmaildir.el, lisp/image.el:
* lisp/international/ccl.el, lisp/international/fontset.el:
* lisp/international/mule-cmds.el, lisp/international/mule.el:
* lisp/json.el, lisp/mail/binhex.el, lisp/mail/rmail.el:
* lisp/mail/uudecode.el, lisp/md4.el, lisp/net/dns.el:
* lisp/net/ntlm.el, lisp/net/sasl.el, lisp/net/socks.el:
* lisp/net/tramp.el, lisp/obsolete/levents.el:
* lisp/obsolete/pgg-parse.el, lisp/org/org.el:
* lisp/org/ox-publish.el, lisp/progmodes/cc-defs.el:
* lisp/progmodes/ebnf2ps.el, lisp/progmodes/hideif.el:
* lisp/ps-bdf.el, lisp/ps-print.el, lisp/simple.el:
* lisp/tar-mode.el, lisp/term/common-win.el:
* lisp/term/tty-colors.el, lisp/term/xterm.el, lisp/vc/vc-git.el:
* lisp/vc/vc-hg.el, lisp/x-dnd.el, test/src/data-tests.el:
Prefer ash to lsh when either will do.
* lisp/image.el (image--get-image): Add documentation, and
check overlays for images too (since function 'put-image' from
the same library uses overlays to insert images).
(image-save): Use 'image--get-image'.
333d6f4 (origin/emacs-26) More changes in the Emacs manual
52ca0d1 * lisp/vc/vc.el (vc-deduce-backend): Use ignore-errors.
69e8046 Don't signal error in vc-deduce-backend
f568c91 * doc/misc/tramp.texi: Index more user options.
92ca881 Minor change in the Emacs manual
e055a12 NEWS update about 'string-trim'
96b6e24 Clarify TRAMP process-environment interaction (Bug#30419)
4fa467e * lisp/progmodes/grep.el (grep-num-matches-found): New variable.
a22820a Avoid aborts in cm.c due to too small TTY frame
26f6441 Another set of improvements in the Emacs manual
cef3b42 Fix help in mode-line-mode-menu
f8a493c Improve documentation of desktop restoring
10637af Improve the Emacs manual's chapter "Frames"
d924953 Fix unbound mm-uu-entry in mm-uu
cb2487b Improve Emacs user manual in fixit.texi
66e9527 Another minor change in the manual
6a1c03d More minor changes in the Emacs manual
32fb8c4 Avoid printing garbled error message from image.el
Conflicts:
etc/NEWS
lisp/image.el
* lisp/image.el (image--get-imagemagick-and-warn): Don't use
apostrophe in the error message, as that message is shown from a
unibyte buffer, and will run afoul of the default style of showing
quote characters. (Bug#30405)
63b04c11d5 Fix copyright years by hand
5c7dd8a783 Update copyright year to 2018
220a9ecba1 Merge from Gnulib
312c565566 Don't add empty keyboard macro to macro ring (Bug#24992)
39ca289a7a Allow customization of decoding of "man" command
f8240815ea * etc/NEWS: Add security consideration note on passphrase ...
0c78822c70 Fix subtle problem with scroll-down when scroll-margin is ...
acd289c5a4 Fix problems with indexing in User manual
b240c7846b * lisp/help.el (describe-key): Only (copy-sequence elt) wh...
e879a5444a * src/buffer.c (Frestore_buffer_modified_p): Fix bug#29846
81b1028b63 Improve documentation of 'inhibit-modification-hooks' and ...
7175496d7a Fix doc string of 'enable-recursive-minibuffers'
5b38406491 Fix documentation of delsel and of killing text
# Conflicts:
# etc/NEWS
# etc/refcards/ru-refcard.tex
* lisp/image.el (image--get-imagemagick-and-warn): Bypass imagemagick
check when using NS.
* src/nsimage.m (ns_load_image): Add rotation and resizing
functionality. Move the getMetaData call to before the resize/rotation
so it returns correct metadata.
(EmacsImage::setSizeFromSpec, EmacsImage::rotate): New functions.
* src/nsterm.h (EmacsImage): Add new function prototypes.
(NSCompositingOperationCopy): Add define to older equivalent for
GNUstep and pre-10.12 macOS.
* configure.ac: Don't use libjpeg on Cocoa.
Most of this change is to boilerplate commentary such as license URLs.
This change was prompted by ftp://ftp.gnu.org's going-away party,
planned for November. Change these FTP URLs to https://ftp.gnu.org
instead. Make similar changes for URLs to other organizations moving
away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and
fsf.org when this works, as this will further help defend against
man-in-the-middle attacks (for this part I omitted the MS-DOS and
MS-Windows sources and the test tarballs to keep the workload down).
HTTPS is not fully working to lists.gnu.org so I left those URLs alone
for now.
* src/image.c (imagemagick_load_image): Set wand size before loading
blob when ':width' and ':height' are provided.
* lisp/image.el (image-format-suffixes): Add 'image/x-rgb'.
Fix Bug#24317
* lisp/image.el (image-type-from-file-name): Bind case-fold-search
to a non-nil value to force a case insensitive match.
* lisp/image-dired.el (image-dired-rotate-original):
Use image-type (Bug#24317).
(image-dired-get-exif-file-name): Idem.
Set 'no-exif-data-found' and 'data' in same setq call.
Use file-attribute-modification-time.
(image-scaling-factor, imagemagick-types-inhibit)
(imagemagick-enabled-types): Remove redundant :group.
(image--get-image): Apply de-Morgan and use car-safe.
(image-compute-scaling-factor): Use the argument.
; 1) put-image does not add a display property to its overlay
; 2) it does add a display text property
; 3) an overlay is not a cons whose car is 'image
This reverts commit d05806fda1.
This had already been fixed by using `make-composed-map'. And
we don't want image-map to inherit from special-mode-map, anyway.