Export JPG, TIFF, WEBP missing DPI information

Summary:

When exporting in JPG, TIFF, and WEBP, the dpi as set in Inkscape is not maintained. This results in a different canvas size than intended.

Steps to reproduce:

  • open Inkscape
  • create a canvas of a specific size. ie 8.5"x11"
  • export to PNG, JPG, TIFF, WEBP using a specific dpi. ie 200 dpi
  • open images in GIMP
  • Go to Images > Scale Image to view image dimensions and image dpi

What happened?

  • PNG images were exported in correct canvas width/height units and dpi
  • JPG, TIFF, and WEBP images were exported in different dpi than what was set in Inkscape, resulting in a different canvas size than intended.

What should have happened?

  • All images should have been exported in the same canvas size and dpi. ie. 8.5"x11", 1700x2200 pixels @200 dpi

Sample attachments:

Version info

Inkscape 1.2 (dc2aedaf03, 2022-05-15)

    GLib version:     2.72.1
    GTK version:      3.24.33
    glibmm version:   2.66.4
    gtkmm version:    3.24.6
    libxml2 version:  2.9.14
    libxslt version:  1.1.35
    Cairo version:    1.17.6
    Pango version:    1.50.7
    HarfBuzz version: 4.2.1

    OS version:       Windows 10 21H1
Edited by Nathan Lee