If you're interested in reusing the HSV values every time you need to process the image, you could write a binary file that holds them. That involves however duplication of your image in some form, but it may be useful if you've got multiple processes that need those values and due to a large image size, would like to avoid the conversion step. In general, however, you read the RGB values, convert them to HSV, process them, convert them back to RGB, and save the processed image.
If you want to store your HSV values in your image file and be able to display it as a "map" of these channels, you can probably think of it in terms of mapping the HSV values onto the RGB interval. RGB values are in the 0-255 interval each, while in HSV, Hue is in 0 - 360, S and V in 0.0 - 0.1. This means that you could store the S and V values in G and B by multiplying them with 255:
G = S * 255;
B = V * 255;
As for the H value, you must map it in the 0 - 255 space, so you multiply it with (255 / 360) and store it in the R component. So there it is, the last piece:
R = H * 255 / 360;