Made get_file_format function more robust. Modifications in image_to_j2k.c, j2k_to_im...