Going back to the original question posted - the OP appears to be indicating that he was trying to do in camera HDR. In that case, the camera body takes multiple images and automagically decides what is best, slices, dices, folds, spindles and mutilates the individual bits of the images together into one single image that is then recorded. As indicated previously its a JPG.
However - there is another option, and that is to shoot and have recorded, several individual images (RAW or JPG - although personally, I believe that RAW works better). The body supports this also - and its called bracketing (3 up to 5 images depending on the body).. The K20 has a single button on the back to assist with this (which I consider a really nice feature). With the K5, they have moved it to the menu (where it is not as convenient). The rub here is that the magic is done in post processing and you the photographer provides the automagic presto digitation in making the HDR product - through the use of additional software.