[gimp/goat-invasion] app: ask the image for the RGB format in gimp_selection_extract()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/goat-invasion] app: ask the image for the RGB format in gimp_selection_extract()
- Date: Sat, 21 Apr 2012 06:36:40 +0000 (UTC)
commit 15fa9ac7131d18e6141dbcbf5c1f4e44df5fd429
Author: Michael Natterer <mitch gimp org>
Date: Sat Apr 21 08:35:52 2012 +0200
app: ask the image for the RGB format in gimp_selection_extract()
instead of hardcoding it.
app/core/gimpselection.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/app/core/gimpselection.c b/app/core/gimpselection.c
index f2647e2..c66d3a1 100644
--- a/app/core/gimpselection.c
+++ b/app/core/gimpselection.c
@@ -673,10 +673,9 @@ gimp_selection_extract (GimpSelection *selection,
/* How many bytes in the temp buffer? */
if (babl_format_is_palette (src_format) && ! keep_indexed)
{
- if (add_alpha || babl_format_has_alpha (src_format))
- dest_format = babl_format ("R'G'B'A u8");
- else
- dest_format = babl_format ("R'G'B' u8");
+ dest_format = gimp_image_get_format (image, GIMP_RGB,
+ add_alpha ||
+ babl_format_has_alpha (src_format));
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]