You need to use TIFF images with special settings. https://www.mathworks.com/matlabcentral/fileexchange/30519-export-image-to-tif-or-tiff-file-of-selected-data-type can write those files for you.
Most of the time I see people asking for this, what they are doing is wavelet based steganography, and when they discover that the altered wavelet coefficients decode to non-integer values, they want to write out the non-integer values... in the original file format of the image (such as reading .jpg, wavelet transform, modify coefficients, inverse transform, write as .jpg). That approach does not work (you want to use an integer wavelet transform instead.)