This loads an array of phColor values from a file descriptor which could be stdin. If the function succeeds in reading from the file descriptor, 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] | fd | The file descriptor id to read from |
[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 575 of file ImageDefinitions.c. |