Creates and writes a palette.


H5IM_MAKE_PALETTE(loc_id, pal_name, pal_dims, pal_data)


<pre><code class="language-c">herr_t H5IMmake_palette( hid_t loc_id, const char *pal_name, const hsize_t *pal_dims, const unsigned char *pal_data )</code></pre>

<pre><code class="language-fortran">subroutine h5immake_palette_f(loc_id, dset_name, pal_dims, buf, errcode)
  implicit none
  integer(HID_T), intent(IN) :: loc_id           ! file or group identifier 
  character(LEN=*), intent(IN) :: dset_name      ! name of the dataset 
  integer(HSIZE_T), intent(IN), dimension(*) :: pal_dims 
                                                 ! dimensions  
  integer*1, intent(IN), dimension(*) :: buf     ! 1 byte integer data buffer 
  integer :: errcode                             ! error code
end subroutine h5immake_palette_f</code></pre>

hid_t loc_idIN: Identifier of the file or group to create the dataset within.
const char *pal_nameIN: The name of the palette.
const hsize_t * pal_dimsIN: An array of the size of the palette dimensions.
const unsigned char *pal_data    IN: Buffer with data to be written to the dataset.


H5IMmake_palette creates and writes a dataset named pal_name. Attributes conforming to the HDF5 Image and Palette specification are attached to the dataset, thus identifying it as a palette. The palette data is of the type H5T_NATIVE_UCHAR.


Returns a non-negative value if successful; otherwise returns a negative value.


Coming Soon!