[babl] babl: permit registering model conversions for non-rgb models
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] babl: permit registering model conversions for non-rgb models
- Date: Tue, 6 Nov 2018 13:26:47 +0000 (UTC)
commit bee0f4d2876a62204785a3638874e224293a3c90
Author: Øyvind Kolås <pippin gimp org>
Date: Tue Nov 6 14:18:20 2018 +0100
babl: permit registering model conversions for non-rgb models
babl/babl-conversion.c | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
---
diff --git a/babl/babl-conversion.c b/babl/babl-conversion.c
index 1127c00..180ddad 100644
--- a/babl/babl-conversion.c
+++ b/babl/babl-conversion.c
@@ -228,20 +228,13 @@ _conversion_new (const char *name,
const Babl *src_format = NULL;
const Babl *dst_format = NULL;
- if (model_is_rgba (BABL (babl->conversion.source)) ||
- model_is_rgba (BABL (babl->conversion.destination)))
- {
- src_format = babl_format_with_model_as_type (
- BABL (babl->conversion.source),
- babl_type_from_id (BABL_DOUBLE));
- dst_format = babl_format_with_model_as_type (
- BABL (babl->conversion.destination),
- babl_type_from_id (BABL_DOUBLE));
- }
- else
- {
- babl_fatal ("neither source nor destination model is RGBA (requirement might be temporary)");
- }
+ src_format = babl_format_with_model_as_type (
+ BABL (babl->conversion.source),
+ babl_type_from_id (BABL_DOUBLE));
+ dst_format = babl_format_with_model_as_type (
+ BABL (babl->conversion.destination),
+ babl_type_from_id (BABL_DOUBLE));
+
babl_conversion_new (
src_format,
dst_format,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]