From 47e351a3277eaad736633c2856fbdf43fec76a97 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 15 Sep 2000 11:49:22 +0000 Subject: [PATCH] *** empty log message *** --- etc/NEWS | 63 ++++++++++++++++++++++++++++++++++++++++---------- lisp/ChangeLog | 7 ++++++ src/ChangeLog | 18 +++++++++++++++ 3 files changed, 76 insertions(+), 12 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 4d6a3c1d7c4..f41d227c323 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1581,6 +1581,9 @@ functionality with aliases for the mldrag functions. * Lisp changes made after edition 2.6 of the Emacs Lisp Manual, (Display-related features are described in a page of their own below.) +** In image specifications, `:heuristic-mask' has been replaced +with the more general `:mask' property. + ** A `?' can be used in a symbol name without escaping it with a backslash. @@ -2998,20 +3001,56 @@ around an image. `:algorithm ALGO' -Apply an image algorithm to the image before displaying it. ALGO must -be a symbol specifying the algorithm. Currently only `laplace' is -supported which applies a Laplace edge detection algorithm to an image -which is intended to display images "disabled." +Apply an image algorithm to the image before displaying it. + +ALGO `laplace' or `emboss' means apply a Laplace or ``emboss'' +edge-detection algorithm to the image. + +ALGO `(edge-detection :matrix MATRIX :color-adjust ADJUST)' means +apply a general edge-detection algorithm. MATRIX must be either a +nine-element list or a nine-element vector of numbers. A pixel at +position x/y in the transformed image is computed from original pixels +around that position. MATRIX specifies, for each pixel in the +neighborhood of x/y, a factor with which that pixel will influence the +transformed pixel; element 0 specifies the factor for the pixel at +x-1/y-1, element 1 the factor for the pixel at x/y-1 etc. as shown +below. + + (x-1/y-1 x/y-1 x+1/y-1 + x-1/y x/y x+1/y + x-1/y+1 x/y+1 x+1/y+1) + +The resulting pixel is computed from the color intensity of the color +resulting from summing up the RGB values of surrounding pixels, +multiplied by the specified factors, and dividing that sum by the sum +of the factors' absolute values. + +Laplace edge-detection currently uses a matrix of -`:heuristic-mask BG' + (1 0 0 + 0 0 0 + 9 9 -1) + +Emboss edge-detection uses a matrix of + + ( 2 -1 0 + -1 0 1 + 0 1 -2) + +`:mask MASK' + +If MASK is `heuristic' or `(heuristic BG)', build a clipping mask for +the image, so that the background of a frame is visible behind the +image. If BG is not specified, or if BG is t, determine the +background color of the image by looking at the 4 corners of the +image, assuming the most frequently occuring color from the corners is +the background color of the image. Otherwise, BG must be a list `(RED +GREEN BLUE)' specifying the color to assume for the background of the +image. -If BG is not nil, build a clipping mask for the image, so that the -background of a frame is visible behind the image. If BG is t, -determine the background color of the image by looking at the 4 -corners of the image, assuming the most frequently occuring color from -the corners is the background color of the image. Otherwise, BG must -be a list `(RED GREEN BLUE)' specifying the color to assume for the -background of the image. +If MASK is nil, remove a mask from the image, if it has one. Images +in some formats include a mask which can be removed by specifying +`:mask nil'. `:file FILE' diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c86dc955595..6f05d56c6cd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2000-09-15 Gerd Moellmann + + * image.el (create-image): Doc fix. + + * toolbar/toolbar.el (toolbar-add-item): Use `:mask heuristic' + instead of `:heuristic-mask t'. + 2000-09-14 Andrew Innes * makefile.w32-in: Revert to Unix line endings. diff --git a/src/ChangeLog b/src/ChangeLog index 9fe597760db..15f88c91a58 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,21 @@ +2000-09-15 Gerd Moellmann + + * xfns.c (QCmatrix, QCcolor_adjustment, QCmask, Qemboss) + (Qedge_detection, Qheuristic): New symbols. + (syms_of_xfns): Initialize new symbols. + (lookup_image): Handle `:mask X', `:algorithm emboss', and + `algorithm (edge-detection ...)'. + (xbm_format, xpm_format, pbm_format, png_format, jpeg_format): + (tiff_format, gif_format, gs_format): Add `:mask'. + (XBM_MASK, XPM_MASK, PBM_MASK, PNG_MASK, JPEG_MASK, TIFF_MASK) + (GIF_MASK, GS_MASK): New enumerators. + (x_laplace_read_row, x_laplace_write_row): Functions removed. + (emboss_matrix, laplace_matrix): New variables. + (x_to_xcolors, x_from_xcolors, x_detect_edges, x_emboss) + (x_edge_detection): New functions. + (x_laplace): Rewritten in terms of x_detect_edges. + (x_build_heuristic_mask): If image has a mask, free it. + 2000-09-14 Andrew Innes * makefile.w32-in: Revert to Unix line endings. -- 2.39.2