/* Free bitmap B. */
static void
-Free_Bitmap_Record (dpyinfo, bm)
+free_bitmap_record (dpyinfo, bm)
Display_Info *dpyinfo;
Bitmap_Record *bm;
{
if (--bm->refcount == 0)
{
BLOCK_INPUT;
- Free_Bitmap_Record (dpyinfo, bm);
+ free_bitmap_record (dpyinfo, bm);
UNBLOCK_INPUT;
}
}
for (i = 0; i < dpyinfo->bitmaps_last; i++, bm++)
if (bm->refcount > 0)
- Free_Bitmap_Record (dpyinfo, bm);
+ free_bitmap_record (dpyinfo, bm);
dpyinfo->bitmaps_last = 0;
}
/* Clear image cache of frame F. FORCE_P non-zero means free all
images. FORCE_P zero means clear only images that haven't been
displayed for some time. Should be called from time to time to
- reduce the number of loaded images. If image-eviction-seconds is
- non-nil, this frees images in the cache which weren't displayed for
- at least that many seconds. */
+ reduce the number of loaded images. If image-cache-eviction-delay
+ is non-nil, this frees images in the cache which weren't displayed
+ for at least that many seconds. */
void
clear_image_cache (f, force_p)
3. a vector of strings or bool-vectors, one for each line of the
bitmap.
- 4. A string containing an in-memory XBM file. WIDTH and HEIGHT
+ 4. a string containing an in-memory XBM file. WIDTH and HEIGHT
may not be specified in this case because they are defined in the
XBM file.
return XPM_TK_EOF;
}
-/* Functions for color table lookup in XPM data. A Key is a string
+/* Functions for color table lookup in XPM data. A key is a string
specifying the color of each pixel in XPM data. A value is either
an integer that specifies a pixel color, Qt that specifies
transparency, or Qnil for the unspecified color. If the length of
whenever more data is needed. We read the whole image in one step,
so this only adds a fake end of input marker at the end. */
+static JOCTET omfib_buffer[2];
+
static boolean
our_memory_fill_input_buffer (cinfo)
j_decompress_ptr cinfo;
{
/* Insert a fake EOI marker. */
struct jpeg_source_mgr *src = cinfo->src;
- static JOCTET buffer[2];
- buffer[0] = (JOCTET) 0xFF;
- buffer[1] = (JOCTET) JPEG_EOI;
+ omfib_buffer[0] = (JOCTET) 0xFF;
+ omfib_buffer[1] = (JOCTET) JPEG_EOI;
- src->next_input_byte = buffer;
+ src->next_input_byte = omfib_buffer;
src->bytes_in_buffer = 2;
return 1;
}
/* Load GIF image IMG for use on frame F. Value is non-zero if
successful. */
+static int interlace_start[] = {0, 4, 2, 1};
+static int interlace_increment[] = {8, 8, 4, 2};
+
static int
gif_load (f, img)
struct frame *f;
init_color_table ();
bzero (pixel_colors, sizeof pixel_colors);
- for (i = 0; i < gif_color_map->ColorCount; ++i)
- {
- int r = gif_color_map->Colors[i].Red << 8;
- int g = gif_color_map->Colors[i].Green << 8;
- int b = gif_color_map->Colors[i].Blue << 8;
- pixel_colors[i] = lookup_rgb_color (f, r, g, b);
- }
+ if (gif_color_map)
+ for (i = 0; i < gif_color_map->ColorCount; ++i)
+ {
+ int r = gif_color_map->Colors[i].Red << 8;
+ int g = gif_color_map->Colors[i].Green << 8;
+ int b = gif_color_map->Colors[i].Blue << 8;
+ pixel_colors[i] = lookup_rgb_color (f, r, g, b);
+ }
#ifdef COLOR_TABLE_SUPPORT
img->colors = colors_in_color_table (&img->ncolors);
if (gif->SavedImages[ino].ImageDesc.Interlace)
{
- static int interlace_start[] = {0, 4, 2, 1};
- static int interlace_increment[] = {8, 8, 4, 2};
int pass;
int row = interlace_start[0];
return success_p;
}
-/* svg_load_image is a helper function for svg_load, which does the actual
- loading given contents and size, apart from frame and image
- structures, passed from svg_load.
+/* svg_load_image is a helper function for svg_load, which does the
+ actual loading given contents and size, apart from frame and image
+ structures, passed from svg_load.
- Uses librsvg to do most of the image processing.
+ Uses librsvg to do most of the image processing.
- Returns non-zero when sucessful. */
+ Returns non-zero when successful. */
static int
svg_load_image (f, img, contents, size)
- /* Pointer to emacs frame sturcture. */
+ /* Pointer to emacs frame structure. */
struct frame *f;
/* Pointer to emacs image structure. */
struct image *img;
/* This loop handles opacity values, since Emacs assumes
non-transparent images. Each pixel must be "flattened" by
- calculating he resulting color, given the transparency of the
- pixel, and the image background color. */
+ calculating the resulting color, given the transparency of the
+ pixel, and the image background color. */
for (y = 0; y < height; ++y)
{
for (x = 0; x < width; ++x)
defining the supported image types. */
DEFVAR_LISP ("image-types", &Vimage_types,
doc: /* List of potentially supported image types.
-Each element of the list is a symbol for a image type, like 'jpeg or 'png.
+Each element of the list is a symbol for an image type, like 'jpeg or 'png.
To check whether it is really supported, use `image-type-available-p'. */);
Vimage_types = Qnil;