creating a 16bit greyscale image

All,

Is there a way to create a 16bit (ushort) grey scale image with a 8
bit RGB palette and store it into a HDF file and be able to see it as
an image in the HDFViewer?

I am using .net version of HDF. Any sample would be very helpful

Shashi