diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-02-02 22:19:31 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-02-02 22:19:31 +0000 |
commit | a2d1299475cb8f34f99e420ef752bf9366275bf7 (patch) | |
tree | 1a7dd40f663b198d7e525ea07a6a84a63f6e783e /gdk/gdkrgb.c | |
parent | a1a252ce46b50ff199e5ee084036267455b9ec5b (diff) | |
download | gdk-pixbuf-a2d1299475cb8f34f99e420ef752bf9366275bf7.tar.gz |
Make gdk_colormap_sync private since it was never exported in a header
Fri Feb 2 17:16:09 2001 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkcolor-x11.c (gdk_colormap_sync): Make
gdk_colormap_sync private since it was never exported
in a header file.
* gdk/x11/gdkcolor-x11.c (gdk_colormap_new): Fill in
colormap->colors[] for StaticGray, StaticColor colormaps.
* gdk/gdkpixbuf-drawable.c: Fix problems where image->bpp
was being used as if it was image->bits_per_pixel.
* gdk/gdkimage.h, gdk/x11/gdkimage-x11.c: Save the bits-per-pixel
for the image in the GdkImage structure since it isn't
reconstructable, and we need it to handle packed types
* gdk/win32/gdkimage-win32.c: Set image->bits_per_pixel. (I'm making
the assumption that on Win32 image->bits_per_pixel == image->depth,
always.
* gdk/linux-fb/gdkimage-fb.c: Set image->bits_per_pixel.
* gdk/gdkrgb.c (gdk_rgb_select_conv): Exit with an informative
warning message if no converter can be found.
Diffstat (limited to 'gdk/gdkrgb.c')
-rw-r--r-- | gdk/gdkrgb.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gdk/gdkrgb.c b/gdk/gdkrgb.c index aa24b3cfa..600d1f3b7 100644 --- a/gdk/gdkrgb.c +++ b/gdk/gdkrgb.c @@ -2872,13 +2872,7 @@ gdk_rgb_select_conv (GdkRgbInfo *image_info, GdkImage *image) depth = image_info->visual->depth; - /* FIXME: save the bpp in the image; this is hack that works for - * common visuals, not otherwise. - */ - if (depth <= 8) - bpp = depth; - else - bpp = 8 * image->bpp; + bpp = image->bits_per_pixel; byte_order = image->byte_order; if (gdk_rgb_verbose) @@ -3031,6 +3025,16 @@ gdk_rgb_select_conv (GdkRgbInfo *image_info, GdkImage *image) conv_d = gdk_rgb_convert_gray4_d_pack; } + if (!conv) + { + g_warning ("Visual type=%s depth=%d, image bpp=%d, %s first\n" + "is not supported by GdkRGB. Please submit a bug report\n" + "with the above values to bugzilla.gnome.org", + visual_names[vtype], depth, bpp, + byte_order == GDK_LSB_FIRST ? "lsb" : "msb"); + exit (1); + } + if (conv_d == NULL) conv_d = conv; |