10

I downloaded several images that are are .jfif files. I have various enhancements (e.g. context menus) and processing scripts that are keyed to *.jpg files and would like to use these with the new files.

I have read Are all JPEG files JFIF?, but want to explicitly clarify: is it safe (by which I mean no risk of corruption or errors reading the file, either image data or metadata) to directly rename a .jfif file as a .jpg file?

I am trying to understand whether it's fine to simply rename the files and change the extension directly (i.e. the underlying file format is the same) or whether I need to re-encode/re-save these .jfif files as .jpg files (which might result in some lossy compression / quality loss), because the two file formats are different somehow.

Martin
  • 1,506
  • 1
  • 7
  • 20

1 Answers1

8

Yes.

JPEG is not a file format - it's a compression method. It doesn't specify how the compressed data should be stored in a file. There are two file formats that fill in this gap: the original JFIF, and the newer Exif1. They are very similar, mostly compatible and can even be mixed in a single file. Both use the .jpg extension.

Your .jfif file is a JPEG-compressed image stored in a JFIF file format. It's a valid content for a .jpg file.


1 Technically, TIFF also supports JPEG data, but I don't think I've ever seen such file and it's certainly not a common choice for saving JPEGs.

gronostaj
  • 55,965
  • 20
  • 120
  • 179
  • 2
    Thanks @gronostaj -- I just wanted to check with you about JFIF/EXIF as from the research I did myself, I read that [JFIF is mutually **incompatible** with the newer Exchangeable image file format, EXIF](https://en.wikipedia.org/wiki/JPEG_File_Interchange_Format) (which JPEG uses, right?) - Does your answer contradict that then?... To be clear, am not trying to say you are wrong as I freely admit my knowledge of image standards / file-formats is very limited so I may have-misunderstood, am just trying to do a sanity check / correlate the info together in my head. – Martin Jun 18 '21 at 08:24
  • 1
    @Martin [Here you go](https://superuser.com/q/1657522/194694). – gronostaj Jun 18 '21 at 12:17