1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-08 04:30:45 -08:00
Commit graph

73 commits

Author SHA1 Message Date
Chong Yidong
cf26ebe85b (search_image_cache): Remove unused variable. 2007-06-14 01:48:01 +00:00
YAMAMOTO Mitsuharu
c5b8e0eaed (lookup_image): Save frame foreground and background colors.
(search_image_cache): Check if saved and current frame colors match.
2007-06-13 08:22:12 +00:00
Chong Yidong
6cf8ac625b (xpm_load): Remove spurious call to xpm_init_color_cache. 2007-06-06 18:57:12 +00:00
Chong Yidong
d3c35d1703 (search_image_cache): New function. Require background
color match if background color is unspecified in the image spec.
(uncache_image, lookup_image): Use it.
2007-06-03 00:23:33 +00:00
Chong Yidong
91be6b6665 (uncache_image): Fix typo. 2007-05-25 02:02:25 +00:00
Chong Yidong
483e7ae0fa (uncache_image): New function.
(Fimage_refresh): New function.
2007-05-21 23:03:49 +00:00
Chong Yidong
c295e710a2 (pbm_load): Check image size for monochrome pbm. 2007-05-14 14:53:15 +00:00
Chong Yidong
fb0b0862c6 (pbm_load): Correctly check image size for greyscale pbm. 2007-05-12 23:55:51 +00:00
Chong Yidong
39e653ead8 (pbm_load): Signal error for invalid image size. 2007-03-18 23:09:57 +00:00
Glenn Morris
4e6835dbc4 Add 2007 to copyright years. 2007-01-21 04:57:37 +00:00
YAMAMOTO Mitsuharu
ae8279db78 (XDrawLine) [MAC_OS]: Remove macro.
(XCreateGC_pixmap) [!HAVE_NTGUI]: Likewise.
(x_disable_image) [!HAVE_NTGUI]: Use XCreateGC instead of
XCreateGC_pixmap.
2007-01-09 08:53:34 +00:00
YAMAMOTO Mitsuharu
46accb8f6d [MAC_OS] (image_load_qt_1, xpm_scan, xpm_make_color_table_v)
(xpm_put_color_table_v,	xpm_get_color_table_v, xpm_make_color_table_h)
(xpm_put_color_table_h, xpm_get_color_table_h, xpm_str_to_color_key)
(xpm_load_image): Add const qualifier to arguments.
[MAC_OS] (xpm_color_key_strings): Make static const.
2006-10-31 08:31:01 +00:00
Romain Francoise
431feaf6f4 (xbm_read_bitmap_data): Delete extra semicolon. 2006-10-12 19:22:38 +00:00
YAMAMOTO Mitsuharu
edc52b3fa1 [TARGET_API_MAC_CARBON] (image_load_qt_1): Use ComponentResult instead
of OSErr.
2006-08-27 07:08:54 +00:00
Chong Yidong
3165e4509a * image.c (png_load): Don't call fclose on NULL. 2006-05-26 03:33:32 +00:00
YAMAMOTO Mitsuharu
a73c40d183 (gif_load): Allocate Lisp string first. 2006-05-19 09:11:30 +00:00
YAMAMOTO Mitsuharu
8c88cb181b (Qduration) [MAC_OS]: Undo previous change.
(syms_of_image) [MAC_OS]: Likewise.
[MAC_OS] (gif_load): Emulate Graphic Control Extension block.
2006-05-10 08:23:20 +00:00
YAMAMOTO Mitsuharu
fb8b2fc348 (Qduration) [MAC_OS]: New variable.
(syms_of_image) [MAC_OS]: Intern and staticpro it.
[MAC_OS] (gif_load): Save image extension data in img->data.lisp_val.
[MAC_OSX] (image_load_quartz2d): Use cfstring_create_with_utf8_cstring
instead of cfstring_create_with_string.
2006-05-06 06:52:24 +00:00
Kim F. Storm
6ac3c7bb02 (four_corners_best): New arg CORNERS specifies what pixels
to look at in case image has margin.
(x_create_bitmap_mask): Pass NULL for CORNERS to four_corners_best.
(image_background, image_background_transparent)
(x_build_heuristic_mask): Pass img->corners to four_corners_best.
(gif_load): Set img->corners according to image's margin spec.
Use img->corners values directly where applicable.
Save image extension data in img->data.lisp_val.
(gif_clear_image): New function to free img->data.lisp_val.
(gif_type): Use it instead of generic x_clear_image.
(Fimage_extension_data): New defun.
(syms_of_image): Defsubr it.
2006-04-21 14:07:05 +00:00
YAMAMOTO Mitsuharu
0b8ac84202 [MAC_OS] (xpm_load_image): Fill in background field
while we have ximg handy.
2006-04-21 07:56:33 +00:00
YAMAMOTO Mitsuharu
1caa0b53a0 (x_create_bitmap_from_data) [MAC_OS]: Don't check return
value of xmalloc.
2006-04-18 08:10:30 +00:00
YAMAMOTO Mitsuharu
9db94f8296 [MAC_OS] (xpm_load_image): Add parentheses around
assignment used as truth value.  Add explicit braces to avoid
ambiguous `else'.
[MAC_OS] (gif_load): Remove unused variable `gcpro1'.
2006-04-12 08:05:52 +00:00
Kenichi Handa
022af1243c Include "charset.h" and "coding.h".
(x_find_image_file): Return an encoded file name.
2006-04-03 01:23:44 +00:00
YAMAMOTO Mitsuharu
c7fea3257f [MAC_OS] (XPutPixel, XGetPixel)
[!WORDS_BIG_ENDIAN && USE_CG_DRAWING]: Don't use specialized
version when depth is 32.
(mac_create_cg_image_from_image) [MAC_OS && USE_CG_DRAWING]: New
function.
(prepare_image_for_display) [MAC_OS && USE_CG_DRAWING]: Use it.
(x_clear_image_1) [MAC_OS && USE_CG_DRAWING]: Release CGImage.
2006-03-16 08:05:34 +00:00
YAMAMOTO Mitsuharu
4cdffedfae [MAC_OS] (XPutPixel): Set alpha channel bits if pixmap depth is 32.
[MAC_OS] (XGetPixel): Strip off alpha channel bits if pixmap depth is 32.
2006-03-08 03:25:26 +00:00
Thien-Thi Nguyen
aaef169dc6 Update years in copyright notice; nfc. 2006-02-06 15:23:23 +00:00
YAMAMOTO Mitsuharu
2d22e7edf2 [MAC_OS] (find_image_fsspec): Use coercion of Apple event data for
translation from/to file names.
2005-12-24 02:50:00 +00:00
YAMAMOTO Mitsuharu
dac5344bda (init_image) [MAC_OS]: Don't call EnterMovies.
[!HAVE_GIF && MAC_OS] (gif_load): Call EnterMovies.
2005-12-10 01:49:15 +00:00
Chong Yidong
0d876a1479 Fix typo. 2005-11-18 19:11:19 +00:00
Chong Yidong
fe45ad152a * image.c (x_create_bitmap_from_xpm_data): Free attributes on
fail.
2005-11-18 03:57:36 +00:00
Chong Yidong
54188d8fb0 initialize XpmAttributes 2005-11-16 13:38:25 +00:00
Chong Yidong
786a43d6cf * gnu.h (gnu_bits): Xpm version of the new Emacs icon.
* xterm.c (x_bitmap_icon): Use the xpm if available.

	* image.c (x_create_bitmap_from_xpm_data): New function.
2005-11-16 05:49:18 +00:00
YAMAMOTO Mitsuharu
308a660736 (init_image) [MAC_OS]: Don't call EnterMovies if
inhibit_window_system is set.
2005-11-15 03:18:37 +00:00
YAMAMOTO Mitsuharu
54eaa188d3 [MAC_OSX] (image_load_quartz2d): Fix memory leak. 2005-11-09 08:07:18 +00:00
YAMAMOTO Mitsuharu
de297941ce [MAC_OS] (image_load_qt_1): Check image size.
Use GraphicsImportGetImageDescription instead of
GraphicsImportGetNaturalBounds.
[MAC_OSX] (image_load_quartz2d): Check image size.
[MAC_OS] (xpm_load_image): Likewise.
2005-10-25 08:12:44 +00:00
Kim F. Storm
7df4765a4c (check_image_size): Handle integer Vmax_image_size value
directly as max pixel value.  Use default frame size for null frame.
(syms_of_image) <max-image-size>: Describe integer value.
2005-10-19 21:52:13 +00:00
Chong Yidong
f1f25b9966 * image.c (Vmax_image_size): New variable.
(check_image_size): New function.
	(xbm_read_bitmap_data, pbm_load, png_load, jpeg_load, tiff_load)
	(gif_load, gs_load): Use it.
	(lookup_image): Try loading again if previous load failed.
	(xbm_read_bitmap_data): Add a new argument, a pointer to the frame
	to display in, NULL if none.
	(xbm_load_image, xbm_file_p): Pass xbm_read_bitmap_data the new
	argument.
2005-10-19 03:54:56 +00:00
Juanma Barranquero
b25a72ab31 (fn_jpeg_stdio_src): Don't define it.
(init_jpeg_functions): Don't initialize `fn_jpeg_stdio_src'.
(our_common_init_source): Rename from `our_init_source'.
(our_common_term_source): Rename from `our_term_source'.
(our_memory_fill_input_buffer): Rename from `our_fill_input_buffer'.
(our_memory_skip_input_data): Rename from `our_skip_input_data'.
(jpeg_memory_src): Use the new names.
(struct jpeg_stdio_mgr): New struct.
(JPEG_STDIO_BUFFER_SIZE): New constant.
(our_stdio_fill_input_buffer, our_stdio_skip_input_data, jpeg_file_src): New
functions.
(jpeg_load): Use `jpeg_file_src' instead of `fn_jpeg_stdio_src'.
2005-10-11 08:25:27 +00:00
Dan Nicolaescu
fa8459a34e * image.c (slurp_file, xbm_read_bitmap_data): Cast to the correct
type.
* xterm.c (handle_one_xevent, handle_one_xevent): Likewise.

* unexelf.c (fatal): Fix prototype.

* term.c (fatal): Implement using varargs.

* regex.c (re_char): Move typedef ...
* regex.h (re_char): ... here.
(re_iswctype, re_wctype, re_set_whitespace_regexp): New
prototypes.

* emacs.c (malloc_set_state): Fix return type.
(endif): Fix type.

* lisp.h (fatal): Add argument types.

* dispextern.h (fatal): Delete prototype.

* systime.h: (make_time): Prototype moved from ...
* editfns.c (make_time): ... here.

* editfns.c: Move systime.h include after lisp.h.
* dired.c:
* xsmfns.c:
* process.c: Likewise.

* alloc.c (old_malloc_hook, old_realloc_hook, old_realloc_hook):
Add parameter types.
(__malloc_hook, __realloc_hook, __free_hook): Fix prototypes.
(emacs_blocked_free): Change definition to match __free_hook.
(emacs_blocked_malloc): Change definition to match __malloc_hook.
(emacs_blocked_realloc): Change definition to match
__realloc_hook.
2005-09-30 22:38:16 +00:00
Kim F. Storm
0f4aca467e (gif_load): Fix size of allocated image buffer
for images where a sub-image may be larger than the image's
total height/width specifications.
2005-09-28 10:48:20 +00:00
YAMAMOTO Mitsuharu
9ecf640371 (PIX_MASK_DRAW, PIX_MASK_RETAIN): Remove argument. All uses changed.
[MAC_OS] (XPutPixel, XGetPixel): Add efficient versions for common
cases.
(x_create_x_image_and_pixmap) [MAC_OS]: Don't call x_destroy_x_image.
[MAC_OS] (find_image_fsspec) [!MAC_OSX]: Don't use FSRef.  Use
posix_pathname_to_fsspec.
[MAC_OS] (xpm_load_image): Fill in background_transparent field
while we have mask.
2005-08-31 08:35:28 +00:00
Richard M. Stallman
7c4e3a3219 (syms_of_image): Init Qxbm, Qpbm before calling define_image_type. 2005-08-15 01:47:01 +00:00
Richard M. Stallman
6e6fc3fd4b (syms_of_image): Init image_types here, and call define_image_type.
(init_image): Not here.
2005-08-11 13:58:12 +00:00
Thien-Thi Nguyen
0b5538bd85 Update years in copyright notice; nfc. 2005-08-07 12:33:19 +00:00
Lute Kamstra
4fc5845fe8 Update FSF's address. 2005-07-04 16:49:24 +00:00
Juanma Barranquero
9a22a004b3 (fn_png_init_io): Don't define it.
(init_png_functions) [HAVE_NTGUI]: Don't initialize fn_png_init_io.
(png_read_from_file): New function, based on png_read_from_memory.
(png_load): Use it, instead of fn_png_init_io.
2005-06-23 07:48:13 +00:00
Eli Zaretskii
2e09fef1ac (x_create_x_image_and_pixmap) [HAVE_NTGUI]: Cast 4th arg
to CreateDIBSection to avoid a compiler warning.
(pbm_load): Cast 3rd arg to IMAGE_BACKGROUND to avoid a compiler
warning.
(png_load): Cast return values of fn_png_create_read_struct and
fn_png_create_info_struct, to avoid compiler warnings on W32.
Cast 3rd arg to IMAGE_BACKGROUND and image_background_transparent
to avoid compiler warnings.
(jpeg_load): Cast return value of fn_jpeg_std_error to avoid a
compiler warning on W32.  Cast 3rd arg to IMAGE_BACKGROUND to
avoid a compiler warning.
(tiff_load): Cast return values of fn_TIFFOpen and
fn_TIFFClientOpen to avoid compiler warning on W32.  Cast 3rd arg
to IMAGE_BACKGROUND to avoid a compiler warning.
(gif_load): Cast return values of fn_DGifOpenFileName and
fn_DGifOpen to avoid compiler warnings on W32.  Cast 3rd arg to
IMAGE_BACKGROUND to avoid a compiler warning.
(DrawText) [HAVE_NTGUI || MAC_OS]: If already defined, undef
before redefining.
2005-06-11 16:25:14 +00:00
Juanma Barranquero
28893db2e7 Update comment. 2005-06-07 13:02:04 +00:00
Juanma Barranquero
2a611c1a4f (Vimage_library_alist): Moved from image.el.
(syms_of_image): Defvar it.
(lookup_image_type): Use it.
2005-05-27 13:16:05 +00:00
Juanma Barranquero
09e8eb5bae (lookup_image, png_read_from_memory): Remove hacks (and misleading comments).
(DEF_IMGLIB_FN): Use C calling convention for image libraries.
2005-05-20 17:51:38 +00:00