Digital RAW photographs (such as .cr2 files from Canon) are typically made and recorded using the digital camera, but some photo editing tools allow users to save into these files as well. The resulting file would still lack the metadata otherwise recorded by the camera, but since many JPEG files actually do contain at least some metadata (EXIF), so it might work. But for JPEGs previously exported from CR2, such jpe to cr2 conversion won't recover them back to their original state.
Updated: July 17, 2023