title: How to write CUSTOM metadata into JPEG with Python?
body: <p>How to write CUSTOM metadata into JPEG with Python?</p>
  
  <p>I tried</p>
  
  <pre><code>import piexif
  exif_dict = {
                  'uwi': myvalue1,
                  'activity_type': myvalue2,
                  'prediction': myvalue3,
                  'url_current': myvalue4,
                  'url_previous': mavalue5
              }
  exif_bytes = piexif.dump(exif_dict)
  with open(filename, "w") as fp:
      test_image.save(fp, "JPEG", exif=exif_bytes)
  </code></pre>
  
  <p>but see nothing in images with <code>XnView</code>. What am I doing wrong?</p>
  
  <p>P.S. I don't need to write camera model, exposure and other stuff. I want to write my own custom metadata.</p>