[ CCode ( array_length_pos = 2.1 , array_length_type = "gsize" ) ]
[ Version ( since = "3.0" ) ]
public uint8[] get_colormap (Object format, out int num_colors)
This procedure returns a palette's colormap as an array of bytes with all colors converted to a given Babl format.
The byte-size of the returned colormap depends on the number of colors and on the bytes-per-pixel size of format. E.g. that
the following equality is ensured:
```C num_bytes == num_colors * babl_format_get_bytes_per_pixel (format) ```
Therefore num_colors and return.length are kinda redundant since both
indicate the size of the return value in a different way. You may both set them to null but not at the
same time.
| this |
The palette. |
| format |
The desired color format. |
| num_colors |
The number of colors in the palette. |
| num_bytes |
The byte-size of the returned value. |
|
The palette's colormap. |