Pentax's code works OK, except when opening files like JPEGs. It displays the file header, and a little bit of whats inside, but it cuts it of (truncates) after about 64 bytes.