### Function

# Babl space_from_icc

#### Declaration [src]

    const Babl*
    babl_space_from_icc (
      const char* icc_data,
      int icc_length,
      BablIccIntent intent,
      const char** error
    )

#### Description [src]

Create a babl space from an in memory ICC profile, the profile does no longer need to be loaded for the space to work, multiple calls with the same icc profile and same intent will result in the same babl space.

On a profile that doesn’t contain A2B0 and B2A0 CLUTs perceptual and relative-colorimetric intents are treated the same.

If a BablSpace cannot be created from the profile NULL is returned and a static string is set on the const char *value pointed at with &value containing a message describing why the provided data does not yield a babl space.

#### Parameters

`icc_data`

  Type: `const char*`

  Pointer to icc profile in memory.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`icc_length`

  Type: `int`

  Length of icc profile in bytes.

`intent`

  Type: `BablIccIntent`

  The intent from the ICC profile to use.

`error`

  Type: `const char**`

  Pointer to a string where decoding errors can be stored, if an error occurs, NULL is returned and an error message is provided in error.

  The argument will be set by the function.
  The called function takes ownership of the data, and is responsible for freeing it.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `Babl`

No description available.

The data is owned by the called function.