EXIF tag · IFD0

SamplesPerPixel

The SamplesPerPixel tag stored in the IFD0 directory.

0x0115
Tag ID (277 decimal)
IFD0
IFD / group
int16u!
Data type
EXIF
Table

What SamplesPerPixel means#

The SamplesPerPixel tag stored in the IFD0 directory.

Read, write and remove it#

# read
exiftool -SamplesPerPixel photo.jpg
# write
exiftool -SamplesPerPixel="…" photo.jpg
# remove
exiftool -SamplesPerPixel= photo.jpg
# all files in a folder, as CSV
exiftool -csv -SamplesPerPixel -r ./photos > samples-per-pixel.csv

In Python with Pillow:

from PIL import Image
exif = Image.open("photo.jpg").getexif()
value = exif.get(0x0115)  # SamplesPerPixel
print(value)

Frequently asked questions#

What is the EXIF tag ID of SamplesPerPixel?

0x0115 (277 decimal), in the IFD0 directory.

How do I see SamplesPerPixel in a photo?

Run exiftool -SamplesPerPixel photo.jpg, or open the file's info panel in Lightroom, Photoshop, Windows (Properties → Details) or macOS Preview (Tools → Show Inspector).

Last updated October 03, 2026 · How we calculate · Sources