babl.git
6 years agomeson: adapt to changes in docs build
Øyvind Kolås [Mon, 22 Jul 2019 02:41:50 +0000 (04:41 +0200)]
meson: adapt to changes in docs build

6 years agodocs: add separate pages for CMYK, ColorManagement and alpha
Øyvind Kolås [Mon, 22 Jul 2019 02:06:26 +0000 (04:06 +0200)]
docs: add separate pages for CMYK, ColorManagement and alpha

6 years agodocs: remove reference to non-existing file build-docs.sh
Øyvind Kolås [Mon, 22 Jul 2019 01:40:42 +0000 (03:40 +0200)]
docs: remove reference to non-existing file build-docs.sh

6 years agobabl-space: add universal convertors between linear and nonlinear
Øyvind Kolås [Mon, 22 Jul 2019 01:22:11 +0000 (03:22 +0200)]
babl-space: add universal convertors between linear and nonlinear

Register conversions for all space pairs between "R'G'B'A float" and
"RGBA float" and vice versa, both SSE2 and non SIMD versions.

6 years agobabl-space: indentation improvements
Øyvind Kolås [Mon, 22 Jul 2019 01:08:09 +0000 (03:08 +0200)]
babl-space: indentation improvements

6 years agobabl-fish: use abstraction for checking if space is cmyk
Øyvind Kolås [Sat, 20 Jul 2019 15:15:29 +0000 (17:15 +0200)]
babl-fish: use abstraction for checking if space is cmyk

6 years agobabl-fish-path: cache a local sRGB space instance
Øyvind Kolås [Sat, 20 Jul 2019 15:15:03 +0000 (17:15 +0200)]
babl-fish-path: cache a local sRGB space instance

6 years agobabl-space: 0 initialize temporary stack allocated BablSpace instances
Øyvind Kolås [Sat, 20 Jul 2019 13:34:15 +0000 (15:34 +0200)]
babl-space: 0 initialize temporary stack allocated BablSpace instances

After the CMYK support was added, we ended up sometimes having the is_cmyk
flag set on RGB matrix profiles, leading to forced reference conversions.

6 years agoextensions/CIE.c: improve handling of near zero values
Øyvind Kolås [Thu, 4 Jul 2019 11:11:05 +0000 (13:11 +0200)]
extensions/CIE.c: improve handling of near zero values

Negative values were treated as near zero, causing more clipping than
neccesary to occur.

6 years agobabl: make model_is_symmetric test adapt tolerance for high values
Øyvind Kolås [Thu, 4 Jul 2019 10:32:07 +0000 (12:32 +0200)]
babl: make model_is_symmetric test adapt tolerance for high values

When the values used are in the billions, the tolerance that originally
was mostly intended for values in the range 0.0-1.0 and its neighborhood
break apart - use 1% of component values as symmetry threshold for such
values.

6 years agoAdd Yu'v' (CIE 1976 UCS) to babl CIE color spaces
Elle Stone [Sat, 29 Jun 2019 16:45:34 +0000 (12:45 -0400)]
Add Yu'v' (CIE 1976 UCS) to babl CIE color spaces

Yu'v' is a linear transform of xyY that is more perceptually
uniform, and well-suited for eg creating chromaticity diagrams
that aren't misleading when comparing various RGB color spaces.

This color space has been recommended by many people as a better
choice than xyY. ACES documentation already uses this color space.

6 years agobabl: performance improvement in model-gray
Thomas Manni [Mon, 24 Jun 2019 10:12:38 +0000 (12:12 +0200)]
babl: performance improvement in model-gray

Use multiplication by the inverse instead of division in
premultiplied to non-premultiplied alpha conversion functions.

6 years agomeson: fix typoed filename
Øyvind Kolås [Wed, 19 Jun 2019 21:41:51 +0000 (23:41 +0200)]
meson: fix typoed filename

6 years agoAUTHORS: add some missing entries
Øyvind Kolås [Wed, 19 Jun 2019 13:28:47 +0000 (15:28 +0200)]
AUTHORS: add some missing entries

6 years agodocs: add tools dir to dir-overview
Øyvind Kolås [Wed, 19 Jun 2019 12:27:11 +0000 (14:27 +0200)]
docs: add tools dir to dir-overview

6 years agotests: rename from transparent_symmetry to alpha_symmetric_transform
Øyvind Kolås [Wed, 19 Jun 2019 12:06:52 +0000 (14:06 +0200)]
tests: rename from transparent_symmetry to alpha_symmetric_transform

6 years agodocs: add section about symmetric alpha transforms
Øyvind Kolås [Wed, 19 Jun 2019 12:04:26 +0000 (14:04 +0200)]
docs: add section about symmetric alpha transforms

6 years agodocs: update
Øyvind Kolås [Wed, 19 Jun 2019 11:20:43 +0000 (13:20 +0200)]
docs: update

6 years agobabl/base: use symmetric alpha transformations for CMYK
Øyvind Kolås [Wed, 19 Jun 2019 09:35:30 +0000 (11:35 +0200)]
babl/base: use symmetric alpha transformations for CMYK

6 years agomeson: add transparent_symmetry test
Øyvind Kolås [Thu, 13 Jun 2019 15:12:36 +0000 (17:12 +0200)]
meson: add transparent_symmetry test

6 years agoextensions: fix up some lingering references to babl_alpha_avoid_zero
Øyvind Kolås [Thu, 13 Jun 2019 15:08:57 +0000 (17:08 +0200)]
extensions: fix up some lingering references to babl_alpha_avoid_zero

6 years agobabl: symmetric conversions between associated and separate alpha.
Øyvind Kolås [Thu, 13 Jun 2019 15:00:23 +0000 (17:00 +0200)]
babl: symmetric conversions between associated and separate alpha.

Provide symmetric, color data preserving conversions between associated and
separate alpha for alpha values near and equal to 0.0 at single precision
floating point. Thus these symmetric conversions also augment associated alpha
to always maintain color information.

This is achieved by clamping the alpha used when computing the color
components when multiplying/dividing components between separate and
associated alpha to BABL_ALPHA_FLOOR and -BABL_ALPHA_FLOOR for values
near 0.0, the alpha value is copied unmodified between pixels; the main
improvement of this commit.

In the implementation BABL_ALPHA_FLOOR is 1/65536 = 0.00001526.. small
enough that it vanishing in rounding for 16bit integer alpha but large
enough to retain color data.

The following table illustrates what corresponding values are between the
two alpha encodings supported. We here usea BABL_ALPHA_FLOOR of 0.01 instead
of 0.00001526 to make it easier to see what happens.

```
"RGBA float"                     "RaGaBaA float"
separate alpha                   associated alpha
non-premultiplied                pre-multiplied alpha

    R       G      B      A         Ra     Ga     Ba     A
  10.000   1.000  0.100  0.000     0.100  0.010  0.001  0.000
  10.000   1.000  0.100  0.005     0.100  0.010  0.001  0.005
__10.000___1.000__0.100__0.010_____0.100__0.010__0.001__0.010__
  10.000   1.000  0.100  0.020     0.200  0.020  0.002  0.020
  10.000   1.000  0.100  0.200     2.000  0.200  0.020  0.200
  10.000   1.000  0.100  0.400     4.000  0.400  0.040  0.400

1000.000 100.000 10.000  0.000    10.000  1.000  0.100  0.000
1000.000 100.000 10.000  0.005    10.000  1.000  0.100  0.005
1000.000_100.000_10.000__0.010____10.000__1.000__0.100__0.010___
 500.000  50.000  5.000  0.020    10.000  1.000  0.100  0.020
  50.000   5.000  0.500  0.200    10.000  1.000  0.100  0.200
  25.000   2.500  0.250  0.400    10.000  1.000  0.100  0.400
```

GEGL lets each operation compute with it's preferred encoding - for some
operations like blurs this is associated alpha, for others like color
adjustments it is separate alpha, perhaps even in CIE Lab based encodings
rather than RGB. An earlier iteration of this approach was already in use in
babl making un-erase mode and similar features in GIMP-2.10 work correctly
after blurring, the previous implementation did not preserve the
alpha value.

Just the core of the implementation follows:

```
 #define BABL_ALPHA_FLOOR_F  (1.0f/65536.0f)

static inline float
babl_epsilon_for_zero_float (float value)
{
 if (value <= BABL_ALPHA_FLOOR_F)
 {
   /* for performance one could directly retun BABL_ALPHA_FLOOR_F here
      and dropping handling negative values consistently. */
   if (value >= 0.0f)
     return BABL_ALPHA_FLOOR_F;
   else if (value >= -BABL_ALPHA_FLOOR_F)
     return -BABL_ALPHA_FLOOR_F;
 }
 return value;  /* most common case, return input value */
}

static inline void
separate_to_associated_rgba (const float *separate_rgba,
                                   float *associated_rgba)
{
  float alpha = babl_epsilon_for_zero_float (separate_rgba[3]);

  associated_rgba[0] = separate_rgba[0] * alpha;
  associated_rgba[1] = separate_rgba[1] * alpha;
  associated_rgba[2] = separate_rgba[2] * alpha;
  associated_rgba[3] = separate_rgba[3]; /* direct copy */
}

static inline void
associated_to_separate_rgba (const float *associated_rgba,
                                   float *separate_rgba)
{
  float alpha = babl_epsilon_for_zero_float (associated_rgba[3]);
  float reciprocal_alpha = 1.0f / alpha; /* the conditional normally in
                                            this conversion to avoid
                                            division by zero is handled by
                                            epsilon_for_zero */
  separate_rgba[0] = associated_rgba[0] * reciprocal_alpha;
  separate_rgba[1] = associated_rgba[1] * reciprocal_alpha;
  separate_rgba[2] = associated_rgba[2] * reciprocal_alpha;

  separate_rgba[3] = associated_rgba[3]; /* direct copy */
}
```

6 years agopost release version bump
Øyvind Kolås [Wed, 12 Jun 2019 17:45:50 +0000 (19:45 +0200)]
post release version bump

6 years agorelease 0.1.66
Øyvind Kolås [Wed, 12 Jun 2019 17:44:28 +0000 (19:44 +0200)]
release 0.1.66

6 years agoremove unused/unexported API to access internal matrices
Øyvind Kolås [Wed, 12 Jun 2019 13:31:47 +0000 (15:31 +0200)]
remove unused/unexported API to access internal matrices

6 years agobabl: always intialize encoding pointer during format construction
Øyvind Kolås [Thu, 30 May 2019 15:50:10 +0000 (17:50 +0200)]
babl: always intialize encoding pointer during format construction

This fixes issue #35, we initialize with NULL which will cause
babl_format_get_encoding to itself call babl_get_name rather.

6 years agobabl: implement babl_space_get_rgb_luminance
Øyvind Kolås [Tue, 28 May 2019 23:58:30 +0000 (01:58 +0200)]
babl: implement babl_space_get_rgb_luminance

This provides the factors often found as defines hard-coded for sRGB
with values that are adapted to the primaries of the RGB family of
pixel encodings for a given babl space.

6 years agoremove unused file conversions-type.c
Øyvind Kolås [Tue, 28 May 2019 21:32:34 +0000 (23:32 +0200)]
remove unused file conversions-type.c

Really resolving merge request !12 this time.

6 years agoRevert "meson: fix build for arch:i686 , cc:gcc-7"
Jan Vesely [Sun, 26 May 2019 16:26:44 +0000 (12:26 -0400)]
Revert "meson: fix build for arch:i686 , cc:gcc-7"

This reverts commit 80347ef5b8706ddc0a2854dd5ff545b2d66ede4a.
Adding -march=native is a bad idea as it breaks invalidates individual
extension switches (sse, ...)
Issue #29 was fixed in e75a27b5346f4c8480180479b7524b1b20ed8321.

6 years agoautotools,meson: post release version bump
Øyvind Kolås [Sat, 25 May 2019 17:06:06 +0000 (19:06 +0200)]
autotools,meson: post release version bump

6 years agorelease 0.1.64
Øyvind Kolås [Sat, 25 May 2019 17:01:55 +0000 (19:01 +0200)]
release 0.1.64

6 years agomeson: fix build for arch:i686 , cc:gcc-7
Øyvind Kolås [Sat, 25 May 2019 16:35:57 +0000 (18:35 +0200)]
meson: fix build for arch:i686 , cc:gcc-7

Fixing issue #29 and merge reuqest !6.

6 years agogitlab-ci: Consolidate pacman setup and cache downloaded pacman packages
Jan Vesely [Sun, 5 May 2019 02:14:26 +0000 (22:14 -0400)]
gitlab-ci: Consolidate pacman setup and cache downloaded pacman packages

Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
6 years agogitlab-ci: Consolidate configuraiton into hierarchy of extensible configs
Jan Vesely [Sun, 5 May 2019 02:10:19 +0000 (22:10 -0400)]
gitlab-ci: Consolidate configuraiton into hierarchy of extensible configs

Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
6 years agomeson build: add missing sse2 compiler flags to babl library build
John Marshall [Fri, 3 May 2019 08:56:35 +0000 (09:56 +0100)]
meson build: add missing sse2 compiler flags to babl library build

6 years agomeson build: improve lcms dependency handling
John Marshall [Mon, 1 Apr 2019 22:08:48 +0000 (23:08 +0100)]
meson build: improve lcms dependency handling

6 years agomeson build: add new tests
John Marshall [Fri, 29 Mar 2019 09:13:25 +0000 (09:13 +0000)]
meson build: add new tests

6 years agomeson build: use index_html target name for README file generation
John Marshall [Fri, 29 Mar 2019 09:12:24 +0000 (09:12 +0000)]
meson build: use index_html target name for README file generation

6 years agomeson build: implement new copy option with configure_file
John Marshall [Fri, 29 Mar 2019 09:08:07 +0000 (09:08 +0000)]
meson build: implement new copy option with configure_file

6 years agomeson build: only build docs if we can run required objects in build environment
John Marshall [Mon, 11 Jun 2018 09:12:24 +0000 (10:12 +0100)]
meson build: only build docs if we can run required objects in build environment

6 years agomeson build: add descriptions for configuration options
John Marshall [Mon, 11 Jun 2018 09:00:49 +0000 (10:00 +0100)]
meson build: add descriptions for configuration options

6 years agomeson build: clean up library dependency check
John Marshall [Mon, 11 Jun 2018 08:51:27 +0000 (09:51 +0100)]
meson build: clean up library dependency check

6 years agomeson build: improve function checking
John Marshall [Mon, 11 Jun 2018 08:40:45 +0000 (09:40 +0100)]
meson build: improve function checking

6 years agomeson build: try to add -Ofast to CFLAGS
John Marshall [Mon, 11 Jun 2018 08:27:33 +0000 (09:27 +0100)]
meson build: try to add -Ofast to CFLAGS

6 years agogit: build cleanup - add missing build objects to .gitignore
John Marshall [Tue, 16 Apr 2019 08:58:42 +0000 (09:58 +0100)]
git: build cleanup - add missing build objects to .gitignore

6 years agotests: remove duplicate extract test
John Marshall [Tue, 29 May 2018 14:37:08 +0000 (15:37 +0100)]
tests: remove duplicate extract test

6 years agobuild: remove unecessary _la_SOURCE entry from extension makefile
John Marshall [Mon, 1 Apr 2019 10:52:09 +0000 (11:52 +0100)]
build: remove unecessary _la_SOURCE entry from extension makefile

6 years agoremoving conversions-type.c is best done in a different commit
Nuno Ferreira [Sun, 7 Apr 2019 19:38:30 +0000 (20:38 +0100)]
removing conversions-type.c is best done in a different commit

6 years agoremove 'conversions-type.c' file since it is empty
Nuno Ferreira [Sat, 30 Mar 2019 11:15:29 +0000 (11:15 +0000)]
remove 'conversions-type.c' file since it is empty

6 years agocode style review
Nuno Ferreira [Tue, 26 Mar 2019 07:59:15 +0000 (07:59 +0000)]
code style review

fixed style of function headers in the tools folder

6 years agoadd Hygon Dhyana support in arch_get_vendor
hygonsoc [Thu, 2 May 2019 18:36:36 +0000 (02:36 +0800)]
add Hygon Dhyana support in arch_get_vendor

Signed-off-by: hygonsoc <hygonsoc@gmail.com>
6 years agobabl: add Y~aA formats - for completeness
Øyvind Kolås [Thu, 9 May 2019 14:26:37 +0000 (16:26 +0200)]
babl: add Y~aA formats - for completeness

In order for higher level code to be abstracted across all available
permutations we need this. This fixes gegl issue no 151

6 years agobuild: add meson build files to EXTRA_DIST to include in autotools make dist
John Marshall [Sat, 13 Apr 2019 13:21:52 +0000 (14:21 +0100)]
build: add meson build files to EXTRA_DIST to include in autotools make dist

6 years agocode style review
Nuno Ferreira [Tue, 26 Feb 2019 19:47:16 +0000 (19:47 +0000)]
code style review

fixed style of function headers in the babl/extensions folder

6 years agobabl: use inlined lookup functions inside type implementations
Øyvind Kolås [Wed, 6 Mar 2019 11:09:47 +0000 (12:09 +0100)]
babl: use inlined lookup functions inside type implementations

This avoids function call stack overhead for some calls that are
in many of our hot-paths.

6 years agogitlab-ci: Replace base/archlinux with archlinux/base
Jan Vesely [Wed, 20 Feb 2019 21:39:35 +0000 (16:39 -0500)]
gitlab-ci: Replace base/archlinux with archlinux/base

Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
6 years agobabl: remove some redundant processing in babl_fish_reference
Øyvind Kolås [Sun, 24 Feb 2019 17:25:14 +0000 (18:25 +0100)]
babl: remove some redundant processing in babl_fish_reference

6 years agocode style review
Nuno Ferreira [Fri, 22 Feb 2019 22:29:17 +0000 (22:29 +0000)]
code style review

fixed style of function headers in the babl/base folder

6 years agocode style review
Nuno Ferreira [Thu, 21 Feb 2019 23:03:07 +0000 (23:03 +0000)]
code style review

missed this one

6 years agocode style review
Nuno Ferreira [Thu, 21 Feb 2019 22:57:02 +0000 (22:57 +0000)]
code style review

fixed function headers in .c files

6 years agopost-release version bump
Øyvind Kolås [Sat, 2 Feb 2019 19:46:29 +0000 (20:46 +0100)]
post-release version bump

6 years agorelease 0.1.62
Øyvind Kolås [Fri, 1 Feb 2019 16:22:50 +0000 (17:22 +0100)]
release 0.1.62

6 years agoupdate NEWS
Øyvind Kolås [Fri, 1 Feb 2019 16:21:04 +0000 (17:21 +0100)]
update NEWS

6 years agobabl.h: reorder and space out BABL_MODEL_FLAG bitmask
Øyvind Kolås [Fri, 1 Feb 2019 15:11:08 +0000 (16:11 +0100)]
babl.h: reorder and space out BABL_MODEL_FLAG bitmask

This adds a couple spacer slots for additions that might come, like
like coats an ink/paint simulator and spectral bands.

6 years agobabl: rename new space scRGB
Øyvind Kolås [Fri, 1 Feb 2019 14:25:09 +0000 (15:25 +0100)]
babl: rename new space scRGB

The newly addes space is scRGB, babl is still missing scRGB specific
16bit storage, similar to what already exists for CIE Lab in u8.

6 years agopalette: allow a NULL space in babl_new_palette_with_space()
Michael Natterer [Tue, 1 Jan 2019 18:15:40 +0000 (19:15 +0100)]
palette: allow a NULL space in babl_new_palette_with_space()

6 years agoexport symbol babl_new_palette_with_space
Øyvind Kolås [Tue, 1 Jan 2019 16:10:18 +0000 (17:10 +0100)]
export symbol babl_new_palette_with_space

6 years agoNEWS: update
Øyvind Kolås [Sat, 8 Dec 2018 10:29:21 +0000 (11:29 +0100)]
NEWS: update

7 years agoReplace Bugzilla by Gitlab URL in DOAP file
Andre Klapper [Sat, 15 Dec 2018 18:09:33 +0000 (19:09 +0100)]
Replace Bugzilla by Gitlab URL in DOAP file

7 years agoUpdate autogen.sh, typo: intall -> install
apw [Sat, 28 Jul 2018 06:03:39 +0000 (06:03 +0000)]
Update autogen.sh, typo: intall -> install

7 years agoMerge branch 'jvesely/babl-master'
Øyvind Kolås [Thu, 6 Dec 2018 22:18:09 +0000 (23:18 +0100)]
Merge branch 'jvesely/babl-master'

7 years agogitlab-ci: Add builds without liblcms2
Jan Vesely [Thu, 6 Dec 2018 21:57:23 +0000 (16:57 -0500)]
gitlab-ci: Add builds without liblcms2

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
7 years agomeson: Fix build setup wihtout lcms
Jan Vesely [Thu, 6 Dec 2018 22:08:32 +0000 (17:08 -0500)]
meson: Fix build setup wihtout lcms

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
7 years agotests: remove context-less debug printfs
Øyvind Kolås [Thu, 6 Dec 2018 21:53:29 +0000 (22:53 +0100)]
tests: remove context-less debug printfs

7 years agobabl: fix building reference-fish without lcms2
Øyvind Kolås [Thu, 6 Dec 2018 21:34:34 +0000 (22:34 +0100)]
babl: fix building reference-fish without lcms2

7 years agoMerge branch 'jvesely/babl-master'
Øyvind Kolås [Thu, 6 Dec 2018 21:12:09 +0000 (22:12 +0100)]
Merge branch 'jvesely/babl-master'

7 years agotests: add code that processes a palette format with changed space
Øyvind Kolås [Thu, 6 Dec 2018 21:10:02 +0000 (22:10 +0100)]
tests: add code that processes a palette format with changed space

7 years agoAdd gitlab CI configuration
Ján Veselý [Thu, 6 Dec 2018 19:21:27 +0000 (14:21 -0500)]
Add gitlab CI configuration

Build both automake and meson using latest arch
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
7 years agomeson: Add with-lcms option
Ján Veselý [Thu, 6 Dec 2018 20:34:51 +0000 (15:34 -0500)]
meson: Add with-lcms option

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
7 years agomeson: Remove duplicate rule for config.h
Ján Veselý [Thu, 6 Dec 2018 20:06:27 +0000 (15:06 -0500)]
meson: Remove duplicate rule for config.h

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
7 years agomeson: Add missing mode-cmyk.c file to source list
Jan Vesely [Fri, 30 Nov 2018 02:16:06 +0000 (21:16 -0500)]
meson: Add missing mode-cmyk.c file to source list

Fix meson build.
Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
7 years agobabl: make babl_format_with_space not crash with palette based formats
Øyvind Kolås [Thu, 6 Dec 2018 18:19:40 +0000 (19:19 +0100)]
babl: make babl_format_with_space not crash with palette based formats

Now, both palettes referred to by their string name and palettes passed
directly in with a cast get passed through without modification, for
correct behavior their palette entries should also be re-created

(the only way to read out the palette is currently to do an exhaustive buffer
conversion.)

7 years agobabl: add babl_new_palette_with_space
Øyvind Kolås [Thu, 6 Dec 2018 16:09:47 +0000 (17:09 +0100)]
babl: add babl_new_palette_with_space

Handling of space in palettes is still incomplete.

7 years agobabl: special case palette formats in babl_format_with_space
Øyvind Kolås [Thu, 6 Dec 2018 16:06:28 +0000 (17:06 +0100)]
babl: special case palette formats in babl_format_with_space

For now, re-return the original passed in format, this will as
a starter not crash - while the color management is non-functional;
the special casing will be made more elaborate with space support
in babl-palette.

7 years agotests: fix bit-rot in palette tests
Øyvind Kolås [Thu, 6 Dec 2018 09:29:01 +0000 (10:29 +0100)]
tests: fix bit-rot in palette tests

Update to use R'G'B' u8 formats, which is what is now used internally
as well well, along with updating to use the current way of creating
formats with/without transparency.

7 years agobuild: do tests last, for better make check output
Øyvind Kolås [Wed, 5 Dec 2018 02:36:50 +0000 (03:36 +0100)]
build: do tests last, for better make check output

7 years agotests: update cairo hack with final format names
Øyvind Kolås [Mon, 3 Dec 2018 23:41:56 +0000 (00:41 +0100)]
tests: update cairo hack with final format names

7 years agocairo: make mapping of cmyk subset easier
Øyvind Kolås [Mon, 3 Dec 2018 23:18:47 +0000 (00:18 +0100)]
cairo: make mapping of cmyk subset easier

Make the mapping be RGB = CMK  and RGB = CYK, only magenta and yellow
vary between them and the order remains the same, making it easier to
spot inconsitencies in code.

7 years agocairo: move CMYK extension formats here
Øyvind Kolås [Mon, 3 Dec 2018 23:04:45 +0000 (00:04 +0100)]
cairo: move CMYK extension formats here

This adds new endian-aware formats cairo-ACMK32 and cairo-ACKY32 which are
derived from babl_format("camayakaA u8") - converting succesively with these
two formats to this format or other sharing the model permits rebuilding a
complete CMYKA image.

7 years agobabl: rename babl_model_get_flags to babl_get_model_flags
Øyvind Kolås [Mon, 3 Dec 2018 15:41:39 +0000 (16:41 +0100)]
babl: rename babl_model_get_flags to babl_get_model_flags

7 years agobabl: do not synthesize missing components
Øyvind Kolås [Mon, 3 Dec 2018 18:08:02 +0000 (19:08 +0100)]
babl: do not synthesize missing components

This permits copying to a complete format from a reduced set, only
setting the defined components. Earlier this could be achieved by
using a format with PAD for the components.

7 years agoadd a format for muxing cmyk u8 in and out of rgba u8 buffers
Øyvind Kolås [Sun, 2 Dec 2018 22:49:21 +0000 (23:49 +0100)]
add a format for muxing cmyk u8 in and out of rgba u8 buffers

7 years agobabl-fish-reference: do cmyk to cmyk conversions
Øyvind Kolås [Sun, 2 Dec 2018 02:09:17 +0000 (03:09 +0100)]
babl-fish-reference: do cmyk to cmyk conversions

7 years agobase: add more u8 cmyk formats
Øyvind Kolås [Sun, 2 Dec 2018 22:48:28 +0000 (23:48 +0100)]
base: add more u8 cmyk formats

7 years agobabl: make babl_model_get_flags also accept format
Øyvind Kolås [Sun, 2 Dec 2018 22:47:14 +0000 (23:47 +0100)]
babl: make babl_model_get_flags also accept format

perhaps it should be renamed to babl_get_model_flags since it
now operates more generically on babl pointers, it could also
work on bablimage.

7 years agodocs: remove todo item referring to CMYK
Øyvind Kolås [Sun, 2 Dec 2018 18:31:45 +0000 (19:31 +0100)]
docs: remove todo item referring to CMYK

7 years agodocs: update
Øyvind Kolås [Sun, 2 Dec 2018 16:29:59 +0000 (17:29 +0100)]
docs: update

7 years agobase: add half version of CMYK formats
Øyvind Kolås [Sat, 1 Dec 2018 20:35:46 +0000 (21:35 +0100)]
base: add half version of CMYK formats

7 years agobabl: remove dead code
Øyvind Kolås [Sat, 1 Dec 2018 20:35:23 +0000 (21:35 +0100)]
babl: remove dead code

7 years agobabl-fish-reference: keep source/destination space in local variables
Øyvind Kolås [Sat, 1 Dec 2018 20:35:11 +0000 (21:35 +0100)]
babl-fish-reference: keep source/destination space in local variables