Gjsify LogoGjsify Logo

Index

Variables

ALPHA_FLOOR: number
ALPHA_FLOOR_F: number
MAJOR_VERSION: number
MICRO_VERSION: number
MINOR_VERSION: number

Functions

  • Returns the babl object representing the color component given by name such as for example "R", "cyan" or "CIE L".

    Parameters

    • name: string

    Returns Babl.Object

  • exit(): void
  • Deinitializes the babl library and frees any resources used when matched with the number of calls to babl_init().

    Returns void

  • fastFish(sourceFormat: object, destinationFormat: object, performance: string): Babl.Object
  • Create a faster than normal fish with specified performance (and thus corresponding precision tradeoff), values tolerance can hold: NULL and "default", means do same as babl_fish(), other values understood in increasing order of speed gain are: "exact" "precise" "fast" "glitch"

    Fast fishes should be cached, since they are not internally kept track of/made into singletons by babl and many creations of fast fishes will otherwise be a leak.

    Parameters

    • sourceFormat: object
    • destinationFormat: object
    • performance: string

    Returns Babl.Object

  • fish(sourceFormat: object, destinationFormat: object): Babl.Object
  • Create a babl fish capable of converting from source_format to destination_format, source and destination can be either strings with the names of the formats or Babl-format objects.

    Parameters

    • sourceFormat: object
    • destinationFormat: object

    Returns Babl.Object

  • Returns the babl object representing the color format given by name such as for example "RGB u8", "CMYK float" or "CIE Lab u16", creates a format using the sRGB space, to also specify the color space and TRCs for a format, see babl_format_with_space.

    Parameters

    • encoding: string

    Returns Babl.Object

  • formatExists(name: string): number
  • Returns 1 if the provided format name is known by babl or 0 if it is not. Can also be used to verify that specific extension formats are available (though this can also be inferred from the version of babl).

    Parameters

    • name: string

    Returns number

  • formatGetBytesPerPixel(format: Babl.Object): number
  • Returns the babl object representing the color format given by name such as for example "RGB u8", "R'G'B'A float", "Y float" with a specific RGB working space used as the space, the resulting format has -space suffixed to it, unless the space requested is sRGB then the unsuffixed version is used. If a format is passed in as space the space of the format is used.

    Parameters

    Returns Babl.Object

  • getVersion(): [number, number, number]
  • Get the version information on the babl library

    Returns [number, number, number]

  • iccGetKey(iccData: string, iccLength: number, key: string, language: string, country: string): string
  • Parameters

    • iccData: string
    • iccLength: number
    • key: string
    • language: string
    • country: string

    Returns string

  • iccMakeSpace(iccData: string, iccLength: number, intent: IccIntent, error: string): Babl.Object
  • init(): void
  • Returns the babl object representing the color model given by name such as for example "RGB", "CMYK" or "CIE Lab".

    Parameters

    • name: string

    Returns Babl.Object

  • modelIs(babl: Babl.Object, modelName: string): number
  • create a new palette based format, name is optional pass in NULL to get an anonymous format. If you pass in with_alpha the format also gets an 8bit alpha channel. Returns the BablModel of the color model. If you pass in the same name the previous formats will be provided again.

    Parameters

    Returns Babl.Object

  • create a new palette based format, name is optional pass in NULL to get an anonymous format. If you pass in with_alpha the format also gets an 8bit alpha channel. Returns the BablModel of the color model. If you pass in the same name the previous formats will be provided again.

    Parameters

    Returns Babl.Object

  • reset a palette to initial state, frees up some caches that optimize conversions.

    Parameters

    Returns void

  • Assign a palette to a palette format, the data is a single span of pixels representing the colors of the palette.

    Parameters

    • babl: Babl.Object

      a #Babl

    • format: Babl.Object

      The pixel format

    • data: Uint8Array

      The pixel data

    • count: number

      The number of pixels in data

    Returns void

  • process(bablFish: Babl.Object, source: object, destination: object, n: number): number
  • Process n pixels from source to destination using babl_fish, returns number of pixels converted.

    Parameters

    • bablFish: Babl.Object
    • source: object
    • destination: object
    • n: number

    Returns number

  • processRows(bablFish: Babl.Object, source: object, sourceStride: number, dest: object, destStride: number, n: number, rows: number): number
  • Parameters

    • bablFish: Babl.Object
    • source: object
    • sourceStride: number
    • dest: object
    • destStride: number
    • n: number
    • rows: number

    Returns number

  • sampling(horizontal: number, vertical: number): Babl.Object
  • Returns the babl object representing the horizontal and vertical sampling such as for example 2, 2 for the chroma components in YCbCr.

    Parameters

    • horizontal: number
    • vertical: number

    Returns Babl.Object

  • Returns the babl object representing the specific RGB matrix color working space referred to by name. Babl knows of: sRGB, Rec2020, Adobish, Apple and ProPhoto

    Parameters

    • name: string

    Returns Babl.Object

  • Creates a new babl-space/ RGB matrix color space definition with the specified CIE xy(Y) values for white point: wx, wy and primary chromaticities: rx,ry,gx,gy,bx,by and TRCs to be used. After registering a new babl-space it can be used with babl_space() passing its name;

    Internally this does the math to derive the RGBXYZ matrix as used in an ICC profile.

    Parameters

    • name: string

      The name for the color space

    • wx: number

      The X-coordinate of the color space's white point

    • wy: number

      The Y-coordinate of the color space's white point

    • rx: number

      The X-coordinate of the red primary

    • ry: number

      The Y-coordinate of the red primary

    • gx: number

      The X-coordinate of the green primary

    • gy: number

      The Y-coordinate of the green primary

    • bx: number

      The X-coordinate of the blue primary

    • by: number

      The Y-coordinate of the blue primary

    • trcRed: Babl.Object

      The red component of the TRC.

    • trcGreen: Babl.Object

      The green component of the TRC (can be %NULL if it's the same as trc_red).

    • trcBlue: Babl.Object

      The blue component of the TRC (can be %NULL if it's the same as trc_red).

    • flags: SpaceFlags

      The #BablSpaceFlags

    Returns Babl.Object

  • 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

    • iccData: string

      pointer to icc profile in memory

    • iccLength: number

      length of icc profile in bytes

    • intent: IccIntent

      the intent from the ICC profile to use.

    Returns [Babl.Object, string]

  • spaceFromRgbxyzMatrix(name: string, wx: number, wy: number, wz: number, rx: number, gx: number, bx: number, ry: number, gy: number, by: number, rz: number, gz: number, bz: number, trcRed: Babl.Object, trcGreen: Babl.Object, trcBlue: Babl.Object): Babl.Object
  • Creates a new RGB matrix color space definition using a precomputed D50 adapted 3x3 matrix and associated CIE XYZ whitepoint, as possibly read from an ICC profile.

    Parameters

    • name: string

      The name for the color space

    • wx: number

      The X-coordinate of the color space's white point

    • wy: number

      The Y-coordinate of the color space's white point

    • wz: number

      The Z-coordinate of the color space's white point

    • rx: number

      The X-coordinate of the red primary

    • gx: number

      The X-coordinate of the green primary

    • bx: number

      The X-coordinate of the blue primary

    • ry: number

      The Y-coordinate of the red primary

    • gy: number

      The Y-coordinate of the green primary

    • by: number

      The Y-coordinate of the blue primary

    • rz: number

      The Z-coordinate of the red primary

    • gz: number

      The Z-coordinate of the green primary

    • bz: number

      The Z-coordinate of the blue primary

    • trcRed: Babl.Object

      The red component of the TRC.

    • trcGreen: Babl.Object

      The green component of the TRC (can be %NULL if it's the same as trc_red).

    • trcBlue: Babl.Object

      The blue component of the TRC (can be %NULL if it's the same as trc_red).

    Returns Babl.Object

  • query the chromaticities of white point and primaries as well as trcs used for r g a nd b, all arguments are optional (can be %NULL).

    Parameters

    Returns [number, number, number, number, number, number, number, number, Babl.Object, Babl.Object, Babl.Object]

  • Return pointer to ICC profile for space note that this is the ICC profile for R'G'B', though in formats only supporting linear like EXR GEGL chooses to load this lienar data as RGB and use the sRGB TRC.

    Parameters

    Returns [string, number]

  • spaceGetRgbLuminance(space: Babl.Object): [number, number, number]
  • Retrieve the relevant RGB luminance constants for a babl space.

    Parameters

    Returns [number, number, number]

  • Look up a TRC by name, "sRGB" and "linear" are recognized strings in a stock babl configuration.

    Parameters

    • name: string

    Returns Babl.Object

  • Creates a Babl TRC for a specific gamma value, it will be given a name that is a short string representation of the value.

    Parameters

    • gamma: number

    Returns Babl.Object

  • Returns the babl object representing the data type given by name such as for example "u8", "u16" or "float".

    Parameters

    • name: string

    Returns Babl.Object

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method