To convert your HEIC files to JPG while preserving their original timestamps, you can use a two-step process. First, use a tool like FFmpeg or ImageMagick to convert the files. Then, use a script or a command-line tool to copy the original timestamps from the HEIC files to the new JPG files. For instance, in Linux, you can use the touch command with the -r option to replicate the timestamps.
For FFmpeg, you can follow the steps given below:
Launch your command line tool (such as Terminal for MacOS and Linux, or Command Prompt/PowerShell for Windows).
Execute the following FFmpeg command:
ffmpeg -i yourimage.heic newimage.jpg
Here, yourimage.heic should be replaced with the path and name of your HEIC file, and newimage.jpg with the desired path and name for your converted JPG file.
For instance, if you have a file named “example.heic” and you want to convert it to “example.jpg”, you would use:
ffmpeg -i example.heic example.jpg
This instructs FFmpeg to convert example.heic into a JPG file named example.jpg.
Ensure that FFmpeg is installed on your computer before you proceed. If it’s not already installed, you can follow the installation guide: