From eb80a883ee200efb254584b44c46d0d501abe2a6 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Thu, 23 Sep 2004 16:19:08 +0000 Subject: [PATCH] use the exported symbols from libgimp, not the private 2004-09-23 Sven Neumann * libgimp/gimppixbuf.c (gimp_drawable_get_thumbnail, gimp_image_get_thumbnail): use the exported symbols from libgimp, not the private _gimp_drawable_thumbnail() and _gimp_image_thumbnail() functions. * libgimp/gimp.def: added new symbols, removed _gimp_image_thumbnail and _gimp_drawable_thumbnail. --- ChangeLog | 10 +++++++++ libgimp/gimp.def | 27 ++++++++++++++++++++++-- libgimp/gimppixbuf.c | 50 ++++++++++++++++++++------------------------ 3 files changed, 58 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index 988f4e8cd2..54bdfcb2f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-09-23 Sven Neumann + + * libgimp/gimppixbuf.c (gimp_drawable_get_thumbnail, + gimp_image_get_thumbnail): use the exported symbols from + libgimp, not the private _gimp_drawable_thumbnail() + and _gimp_image_thumbnail() functions. + + * libgimp/gimp.def: added new symbols, removed + _gimp_image_thumbnail and _gimp_drawable_thumbnail. + 2004-09-23 Michael Natterer * tools/pdbgen/pdb/brushes.pdb diff --git a/libgimp/gimp.def b/libgimp/gimp.def index e2f558c791..538005c889 100644 --- a/libgimp/gimp.def +++ b/libgimp/gimp.def @@ -1,6 +1,4 @@ EXPORTS - _gimp_drawable_thumbnail - _gimp_image_thumbnail gimp_airbrush gimp_airbrush_default gimp_attach_new_parasite @@ -10,6 +8,7 @@ EXPORTS gimp_brushes_close_popup gimp_brushes_get_brush gimp_brushes_get_brush_data + gimp_brushes_get_brush_info gimp_brushes_get_list gimp_brushes_get_opacity gimp_brushes_get_paint_mode @@ -36,6 +35,28 @@ EXPORTS gimp_clone gimp_clone_default gimp_color_balance + gimp_context_get_background + gimp_context_get_brush + gimp_context_get_font + gimp_context_get_foreground + gimp_context_get_gradient + gimp_context_get_opacity + gimp_context_get_paint_mode + gimp_context_get_palette + gimp_context_get_pattern + gimp_context_pop + gimp_context_push + gimp_context_set_background + gimp_context_set_brush + gimp_context_set_default_colors + gimp_context_set_font + gimp_context_set_foreground + gimp_context_set_gradient + gimp_context_set_opacity + gimp_context_set_paint_mode + gimp_context_set_palette + gimp_context_set_pattern + gimp_context_swap_colors gimp_convolve gimp_convolve_default gimp_curves_explicit @@ -284,6 +305,7 @@ EXPORTS gimp_palettes_get_list gimp_palettes_get_palette gimp_palettes_get_palette_entry + gimp_palettes_get_palette_info gimp_palettes_popup gimp_palettes_refresh gimp_palettes_set_palette @@ -312,6 +334,7 @@ EXPORTS gimp_patterns_get_list gimp_patterns_get_pattern gimp_patterns_get_pattern_data + gimp_patterns_get_pattern_info gimp_patterns_popup gimp_patterns_refresh gimp_patterns_set_pattern diff --git a/libgimp/gimppixbuf.c b/libgimp/gimppixbuf.c index 237ebc6cc7..faa8c7c9a1 100644 --- a/libgimp/gimppixbuf.c +++ b/libgimp/gimppixbuf.c @@ -56,27 +56,24 @@ gimp_image_get_thumbnail (gint32 image_ID, gint height, GimpPixbufTransparency alpha) { - gint thumb_width; - gint thumb_height; + gint thumb_width = width; + gint thumb_height = height; gint thumb_bpp; - gint data_size; guchar *data; g_return_val_if_fail (width > 0 && width <= 512, NULL); g_return_val_if_fail (height > 0 && height <= 512, NULL); - if (! _gimp_image_thumbnail (image_ID, - width, height, - &thumb_width, &thumb_height, &thumb_bpp, - &data_size, &data)) + data = gimp_image_get_thumbnail_data (image_ID, + &thumb_width, + &thumb_height, + &thumb_bpp); + if (data) + return gimp_pixbuf_from_data (data, + thumb_width, thumb_height, thumb_bpp, + alpha); + else return NULL; - - g_return_val_if_fail (data_size == (thumb_width * thumb_height * thumb_bpp), - NULL); - - return gimp_pixbuf_from_data (data, - thumb_width, thumb_height, thumb_bpp, - alpha); } /** @@ -100,26 +97,25 @@ gimp_drawable_get_thumbnail (gint32 drawable_ID, gint height, GimpPixbufTransparency alpha) { - gint thumb_width; - gint thumb_height; + gint thumb_width = width; + gint thumb_height = height; gint thumb_bpp; - gint data_size; guchar *data; g_return_val_if_fail (width > 0 && width <= 512, NULL); g_return_val_if_fail (height > 0 && height <= 512, NULL); - if (! _gimp_drawable_thumbnail (drawable_ID, - width, height, - &thumb_width, &thumb_height, &thumb_bpp, - &data_size, &data)) + data = gimp_drawable_get_thumbnail_data (drawable_ID, + &thumb_width, + &thumb_height, + &thumb_bpp); + + if (data) + return gimp_pixbuf_from_data (data, + thumb_width, thumb_height, thumb_bpp, + alpha); + else return NULL; - - g_return_val_if_fail (data_size == (thumb_width * thumb_height * thumb_bpp), - NULL); - - return gimp_pixbuf_from_data (data, - thumb_width, thumb_height, thumb_bpp, alpha); } static GdkPixbuf *