11

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
  • 2,276

1 Answers1

13

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
  • 58,482