Poppler import creates gradients with unreasonably many stops

Summary:

When importing a pdf using Poppler/Cairo import that has a linar gradient with 3 stops. The gradient ends up having too many gradient stops. It looks like it creates one stop for each shade, rather than sticking with the original 3 stops.

Internal import produces a gradient with 3 stops as it was designed originally.

Steps to reproduce:

  • open Inkscape
  • Import this pdf that consists of a square with a 3 stop gradient: gradient.pdf
  • Choose the Popper/cairo import method
  • Select the square and inspect the gradient

What happened?

The gradient will have a lot more than the 3 stops it originally had

What should have happened?

The gradient should have 3 stops like it was designed.

Sample attachments:

Gradient imported using "Internal import" (Note the three stops, which is correct)

Screen_Shot_2022-09-26_at_19.59.38

Gradient imported using "Poppler/Cairo import" (Note the multiple stops)

Screen_Shot_2022-09-26_at_19.59.43

Version info

Inkscape 1.2.1 (9c6d41e, 2022-07-14)