Tom Kwok

Photos metadata

plot

Distribution of file size for different formats #

The photos library of my phone, which consists of random shots taken in the years 2016 to 2020, is analyzed to compare the file sizes of images encoded in formats JPEG and HEIC.

Histogram of file sizes of images with JPEG format
Histogram of file sizes of images with HEIC format

Both of the histogram plots generated show a right-skewed distribution with the mean greater than the median. Since the ratio mean of file sizes with JPEG to that with HEIC is 1.4574 MB / 2.2827 MB = 0.6385, with JPEG as a baseline, HEIC offers an approximately 36% storage space saving on average.

The statistics could be informative to users of Apple devices on whether savings in storage space justify the loss of backwards compatibility with older software by switching from JPEG to HEIC as the compressed image format.

Limitation of analysis #

While this comparison of the two image formats has practical value as mentioned, it has limited theoretical value for the following factors not controlled.

Note on image formats #

High Efficiency Image File Format (HEIF) with a rich set of features was adopted in Apple software in 2017 with .HEIC as the file extension for single images. Previously, images captured by an Apple device are stored in the popular JPEG format with file extension .JPEG.


iOS camera capture format settings

It is suggested that a similar analysis of file size can be performed on other new compressed image formats, such as the AVIF format.


Distribution of creation time #

The following histogram of the frequency of hours extracted from the "EXIF DateTimeOriginal" field of images shows a curious approximation of a normal distribution. It indirectly represents the frequency of my physical activities in different times of a day.

Histogram of hour of day in image timestamps

A curve with a similar shape and frequency peak value has been observed in a plot of the frequency of hours extracted from my other activity logs that span a long enough period, such as pedometer logs and internet search history.


Changelog