The functions in this section are used for reading and saving palette files.
|
OC_STATUS | ocularLoadPalette (const char *filename, OcPalette *palette) |
|
void | ocularFreePalette (OcPalette *palette) |
| Frees a palette.
|
|
OC_STATUS | read_gimp_palette (const char *filename, OcPalette *palette_data) |
|
OC_STATUS | save_gimp_palette (const char *filename, const OcPalette *palette) |
|
OC_STATUS | read_riff_palette (const char *filename, OcPalette *palette) |
|
OC_STATUS | save_riff_palette (const char *filename, const OcPalette *palette) |
|
OC_STATUS | read_aco_palette (const char *filename, OcPalette *palette) |
|
OC_STATUS | save_aco_palette (const char *filename, const OcPalette *palette) |
|
OC_STATUS | read_paintnet_palette (const char *filename, OcPalette *palette_data) |
|
OC_STATUS | save_paintnet_palette (const char *filename, const OcPalette *palette) |
|
OC_STATUS | read_act_palette (const char *filename, OcPalette *palette) |
|
OC_STATUS | save_act_palette (const char *filename, const OcPalette *palette) |
|
OC_STATUS | read_ase_palette (const char *filename, OcPalette *palette) |
|
◆ ocularLoadPalette()
OC_STATUS ocularLoadPalette |
( |
const char * | filename, |
|
|
OcPalette * | palette ) |
Automatically detect palette format from a file and load palette.
- Parameters
-
filename | The path to the palette file. |
palette | The palette to load the data into. |
- Returns
- OC_STATUS_OK if successful, otherwise an error code (see core.h)
◆ ocularFreePalette()
void ocularFreePalette |
( |
OcPalette * | palette | ) |
|
Frees a palette.
- Parameters
-
palette | The palette to free. |
◆ read_gimp_palette()
OC_STATUS read_gimp_palette |
( |
const char * | filename, |
|
|
OcPalette * | palette_data ) |
Read a GIMP palette file.
- Parameters
-
filename | The path to the GIMP palette file. |
palette_data | The palette to load the data into. |
◆ save_gimp_palette()
OC_STATUS save_gimp_palette |
( |
const char * | filename, |
|
|
const OcPalette * | palette ) |
Save palette data to a GIMP palette file.
- Parameters
-
filename | The path to the file to write to. |
palette | The palette to save. |
◆ read_riff_palette()
OC_STATUS read_riff_palette |
( |
const char * | filename, |
|
|
OcPalette * | palette ) |
Read a Microsoft RIFF palette file.
- Parameters
-
filename | The path to the RIFF palette file. |
palette | The palette to load the data into. |
◆ save_riff_palette()
OC_STATUS save_riff_palette |
( |
const char * | filename, |
|
|
const OcPalette * | palette ) |
Save palette data to a Microsoft RIFF palette file.
- Parameters
-
filename | The path to the file to write to. |
palette | The palette to save. |
◆ read_aco_palette()
OC_STATUS read_aco_palette |
( |
const char * | filename, |
|
|
OcPalette * | palette ) |
Read an Adobe Color Swatch (.aco) file.
- Parameters
-
filename | The path to the ACO file. |
palette | The palette to load the data into. |
◆ save_aco_palette()
OC_STATUS save_aco_palette |
( |
const char * | filename, |
|
|
const OcPalette * | palette ) |
Save palette data to an Adobe Color Swatch (.aco) file. Currently only supports RGB colorspace
- Parameters
-
filename | The path to the file to write to. |
palette | The palette to save. |
◆ read_paintnet_palette()
OC_STATUS read_paintnet_palette |
( |
const char * | filename, |
|
|
OcPalette * | palette_data ) |
Read a Paint.NET palette file.
- Parameters
-
filename | The path to the Paint.NET palette file. |
palette_data | The palette to load the data into. |
◆ save_paintnet_palette()
OC_STATUS save_paintnet_palette |
( |
const char * | filename, |
|
|
const OcPalette * | palette ) |
Save palette data to a Paint.NET palette file.
- Parameters
-
filename | The path to the file to write to. |
palette | The palette to save. |
◆ read_act_palette()
OC_STATUS read_act_palette |
( |
const char * | filename, |
|
|
OcPalette * | palette ) |
Read an Adobe Color Table (.act) file.
- Parameters
-
filename | The path to the ACT file. |
palette | The palette to load the data into. |
◆ save_act_palette()
OC_STATUS save_act_palette |
( |
const char * | filename, |
|
|
const OcPalette * | palette ) |
Save palette data to an Adobe Color Table (.act) file.
- Parameters
-
filename | The path to the file to write to. |
palette | The palette to save. |
◆ read_ase_palette()
OC_STATUS read_ase_palette |
( |
const char * | filename, |
|
|
OcPalette * | palette ) |
Read an Adobe Swatch Exchange (.ase) file. Currently only supports RGB and Grayscale color spaces.
- Parameters
-
filename | The path to the ASE file. |
palette | The palette to load the data into. |