[gimp] app: support premultiplied formats in some gimp_babl functions
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: support premultiplied formats in some gimp_babl functions
- Date: Tue, 7 Jun 2016 22:05:25 +0000 (UTC)
commit 56596da23a98d58ebb89f390d81783b549502b31
Author: Michael Natterer <mitch gimp org>
Date: Wed Jun 8 00:03:48 2016 +0200
app: support premultiplied formats in some gimp_babl functions
app/gegl/gimp-babl.c | 28 ++++++++++++++++------------
1 files changed, 16 insertions(+), 12 deletions(-)
---
diff --git a/app/gegl/gimp-babl.c b/app/gegl/gimp-babl.c
index 4430135..5ab5cdf 100644
--- a/app/gegl/gimp-babl.c
+++ b/app/gegl/gimp-babl.c
@@ -477,10 +477,12 @@ gimp_babl_format_get_base_type (const Babl *format)
{
return GIMP_GRAY;
}
- else if (model == babl_model ("RGB") ||
- model == babl_model ("R'G'B'") ||
- model == babl_model ("RGBA") ||
- model == babl_model ("R'G'B'A"))
+ else if (model == babl_model ("RGB") ||
+ model == babl_model ("R'G'B'") ||
+ model == babl_model ("RGBA") ||
+ model == babl_model ("R'G'B'A") ||
+ model == babl_model ("RaGaBaA") ||
+ model == babl_model ("R'aG'aB'aA"))
{
return GIMP_RGB;
}
@@ -569,17 +571,19 @@ gimp_babl_format_get_linear (const Babl *format)
model = babl_format_get_model (format);
- if (model == babl_model ("Y") ||
- model == babl_model ("YA") ||
- model == babl_model ("RGB") ||
- model == babl_model ("RGBA"))
+ if (model == babl_model ("Y") ||
+ model == babl_model ("YA") ||
+ model == babl_model ("RGB") ||
+ model == babl_model ("RGBA") ||
+ model == babl_model ("RaGaBaA"))
{
return TRUE;
}
- else if (model == babl_model ("Y'") ||
- model == babl_model ("Y'A") ||
- model == babl_model ("R'G'B'") ||
- model == babl_model ("R'G'B'A"))
+ else if (model == babl_model ("Y'") ||
+ model == babl_model ("Y'A") ||
+ model == babl_model ("R'G'B'") ||
+ model == babl_model ("R'G'B'A") ||
+ model == babl_model ("R'aG'aB'aA"))
{
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]