mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 01:43:24 +00:00
libgimp: fix gimp_drawable_get_sub_thumbnail_data().
Since commit 89c359ce47
, it's supposed to return a GBytes, yet it was returning
raw data (probably intermediate hacking state which was not properly cleaned
up).
It was crashing for instance GimpDrawablePreview widgets at drawing time.
This commit is contained in:
parent
4b8f2113f3
commit
4136166d12
1 changed files with 5 additions and 10 deletions
|
@ -186,24 +186,19 @@ gimp_drawable_get_sub_thumbnail_data (GimpDrawable *drawable,
|
|||
gint *actual_height,
|
||||
gint *bpp)
|
||||
{
|
||||
gint ret_width, ret_height;
|
||||
GBytes *image_bytes;
|
||||
gsize data_size;
|
||||
|
||||
_gimp_drawable_sub_thumbnail (drawable,
|
||||
src_x, src_y,
|
||||
src_width, src_height,
|
||||
dest_width,
|
||||
dest_height,
|
||||
&ret_width,
|
||||
&ret_height,
|
||||
dest_width,
|
||||
dest_height,
|
||||
actual_width,
|
||||
actual_height,
|
||||
bpp,
|
||||
&image_bytes);
|
||||
|
||||
*actual_width = ret_width;
|
||||
*actual_height = ret_height;
|
||||
|
||||
return g_bytes_unref_to_data (image_bytes, &data_size);
|
||||
return image_bytes;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue