This loads an array of phColor value from a file. If the function succeeds in opening the file, the color buffer will be allocated and will contain the phColor information that is in the file. If colors == NULL, no allocation will take place.
Make sure to call phFree on the colors buffer.
- Parameters:
-
[in] | filename | A string that contains the filename of the color file. |
[in] | max_colors | This will limit the total number of colors read from a file. If max_colors is 0 then all the colors will be loaded. |
[out] | num_colors | The number of colors loaded from the file is written here. This can be NULL |
[out] | colors | This is a buffer of phColors allocated within the function. |
- Returns:
- The success or failure of the function's ability to load the colors from a file.
- Return values:
-
Definition at line 684 of file ImageDefinitions.c. |