HEIF vs JPG Image Quality Comparison

Started 1 month ago | Discussions thread
ForumParentFirstPrevious
Flat view
Horshack Veteran Member • Posts: 8,674
HEIF vs JPG Image Quality Comparison
4

Newer cameras such as the A7s III, A1, and 1DX III support the HEIF format as a newer option vs JPG. HEIF offers support for up to 16-bits per color vs JPG's 8-bits, which means more tonal range. HEIF also uses a more advanced compression algorithm, borrowed from H.265 (HEVC). Lastly, HEIF's container has more flexibility, including support for multiple images and mix of images/video in a single file, metadata transform support so that images can be instructed to crop, rotated, zoom, etc.. non-destructively, and transparency/alpha channel.

I was interested in how the image quality compares to JPG vs the space savings from the compression, so I created a 512x512 lossless test image composed of various images/patterns I found online and ran that image through Photoshop's JPG conversion at each quality level from 100 to 0.

For HEIF I converted the same lossless PNG to HEIF using heif_enc.exe (libheif), which can be found here. Photoshop is able to read HEIF images (but not write) on Windows when using Microsoft's HEIF Image Extensions (free), which requires Microsoft's HEVC Video Extensions ($0.99). Unfortunately those extensions don't seem to support 10-bit HEIFs or HEIFs encoded using 4:4:4 or 4:2:2 chroma sampling - it only seems to support 4:2:0. To work around this I converted the HEIF's back to lossless PNG using heif_convert.exe, which is included in the same libheif binary build.

There are a lot of provisos for this comparison. First, due to the dearth of HEIF support in image apps right now I had to rely on a single tool (libheif) for the HEIF conversions (although it relies on a mature x265 library), so the quality of the conversions from that tool plays an unknown factor in the HEIF files I produced. Second, the test image I created may not be fully representative of real-world images/performance since it includes some non-photographic elements designed to stress the chroma sampling of the compression algorithms.

Here is a composite image comparing JPG vs HEIF at various quality/compression levels. Note that the specific quality level settings between PS and libheif are not directly comparable so you may want to instead use the file sizes in the captions to decide which images to compare. For HEIF I used all three chroma sampling settings supported at each quality level - 4:4:4, 4:4:2, and 4:4:0. For JPG, Photoshop uses 4:4:4 for quality levels 60 to 100 and 4:2:0 for levels 50 and below.

Sony supports 4:2:0 and 4:2:2 in their cameras' HEIF support (link). It's not clear what chroma encoding Canon supports on the 1DX III but I did find a 1DX III HEIF online and it was 4:2:2.

HEIF vs JPG Comparison Composite Image (2469x6540, 13.7MB)

Observations:

  • The 4:2:2 chroma sampling has a significant impact on IQ for the artifical test pattern (colored concentric circles) on HEIFs, even at maximum quality level. Since the maximum chroma sampling that Sony supports for HEIFs is 4:2:2 this may have an impact on specific real-world shooting scenarios, for example multi-colored patterns on fabrics.
  • Oddly, the 4:2:2 HEIF conversion file sizes from heif_enc.exe are larger than the 4:4:4 conversions.
Sony a7S
If you believe there are incorrect tags, please send us this post using our feedback form.
ForumParentFirstPrevious
Flat view
ForumParentFirstPrevious
Keyboard shortcuts:
FForum PPrevious NNext WNext unread UUpvote SSubscribe RReply QQuote BBookmark MMy threads
Color scheme? Blue / Yellow