"Export PNG Image" with non-alpha bit depth always renders black background

Steps to reproduce:

  • open Inkscape
  • create or load any image
  • go to "File" -> "Export PNG Image" (or press Shift+Ctrl+E)
  • expand the "Advanced" section
  • select any "Bit depth" without an alpha channel, e.g. "RGB_8" or "Gray_8"
  • click "Export"

image

What happened?

Inkscape renders the objects in the exported image against a black background:

bitmap

What should have happened?

Inkscape should have rendered the exported image against the document background color defined under "Edit" -> "Document Properties" -> "Page" -> "Background" (which defaults to transparent white).

Inkscape Version and Operating System:

  • Inkscape Version: 1.0rc1 (09960d6f, 2020-04-09)
  • Operating System: Windows 10 Enterprise
  • Operating System version: 1909

Sample file used for the screenshots above: drawing.svg

Edited by Nathan Lee