[babl] palette: allow a NULL space in babl_new_palette_with_space()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] palette: allow a NULL space in babl_new_palette_with_space()
- Date: Tue, 1 Jan 2019 18:16:38 +0000 (UTC)
commit ce2d1d4e5c9fc001df5334fef0d1504e0da1b629
Author: Michael Natterer <mitch gimp org>
Date: Tue Jan 1 19:15:40 2019 +0100
palette: allow a NULL space in babl_new_palette_with_space()
babl/babl-palette.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/babl/babl-palette.c b/babl/babl-palette.c
index a53f654..d03ad1d 100644
--- a/babl/babl-palette.c
+++ b/babl/babl-palette.c
@@ -727,6 +727,9 @@ const Babl *babl_new_palette_with_space (const char *name,
char cname[64];
+ if (!space)
+ space = babl_space ("sRGB");
+
if (!name)
{
static int cnt = 0;
@@ -873,7 +876,7 @@ const Babl *babl_new_palette (const char *name,
const Babl **format_u8,
const Babl **format_u8_with_alpha)
{
- return babl_new_palette_with_space (name, babl_space("sRGB"),
+ return babl_new_palette_with_space (name, NULL,
format_u8, format_u8_with_alpha);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]