code: def test_exif_jpeg(self, tmp_path):
      with Image.open(
          "Tests/images/exif-72dpi-int.jpg"
      ) as im:  # Little endian
          exif = im.getexif()
          assert 258 not in exif
          assert 274 in exif
          assert 282 in exif
          assert exif[296] == 2
          assert exif[11] == "gThumb 3.0.1"
  
          out = str(tmp_path / "temp.jpg")
          exif[258] = 8
          del exif[274]
          del exif[282]
          exif[296] = 455
          exif[11] = "Pillow test"
          im.save(out, exif=exif)
      with Image.open(out) as reloaded:
          reloaded_exif = reloaded.getexif()
          assert reloaded_exif[258] == 8
          assert 274 not in reloaded_exif
          assert 282 not in reloaded_exif
          assert reloaded_exif[296] == 455
          assert reloaded_exif[11] == "Pillow test"
  
      with Image.open(
          "Tests/images/no-dpi-in-exif.jpg"
      ) as im:  # Big endian
          exif = im.getexif()
          assert 258 not in exif
          assert 306 in exif
          assert exif[274] == 1
          assert exif[305] == "Adobe Photoshop CC 2017 (Macintosh)"
  
          out = str(tmp_path / "temp.jpg")
          exif[258] = 8
          del exif[306]
          exif[274] = 455
          exif[305] = "Pillow test"
          im.save(out, exif=exif)
      with Image.open(out) as reloaded:
          reloaded_exif = reloaded.getexif()
          assert reloaded_exif[258] == 8
          assert 306 not in reloaded_exif
          assert reloaded_exif[274] == 455
          assert reloaded_exif[305] == "Pillow test"
  
imports: import io
  import os
  import shutil
  import sys
  import tempfile
  import pytest
  from PIL import Image, ImageDraw, ImagePalette, UnidentifiedImageError
  from .helper import assert_image_equal, assert_image_equal_tofile, assert_image_similar_tofile, assert_not_all_same, hopper, is_win32, mark_if_feature_version, skip_unless_feature
label_desc: Use image node_id 47 for calling the TestImage obj's underlying member method code with example usage: obj.test_exif_jpeg(tmp_path) without return types