Embedded CMYK jpegs have wrong colors when exported to PDF

Migrated from https://bugs.launchpad.net/inkscape/+bug/1760323
From 2018-03-31

Summary:

Pavel Grishaev wrote...

It happens only on Ubuntu (I have Xenial), not on Windows, and only if I use inkscape as command utility (server). Versions both 0.92.2 and 0.92.3. External embedded CMYK jpegs (from directory near SVG) in input SVG become awful in output PDF. If I output to PNG - no problem, but only PDF.

Steps to reproduce:

I wish I knew exactly what Pavel did and why it works only in Windows. This is what I did.

  • followed the steps outlined here as closely as possible
    • excluding Step 7: not include any bitmap images
  • imported the attached JPG into Inkscape
  • for the sake of experimentation, I added five 5mm strokes, C, M, Y and K plus Red
    • Red to test any perceptual difference when toggling Color Management
      • Conclusion: no perceptual difference
  • Save a Copy… as CMYK.pdf (see below)

What happened?

This...

2018-03-31_1922

CMYK_Inkscape.pdf.zip

What should have happened?

Not that, this...

CMYK02.pdf.zip 553K

Attachments:

The original CMYK jpg...

CMYK.jpg.zip 558K

My test SVG...

CMYK.svg.zip 628K

Migrator's Notes:

  • CMYK02.pdf was created in Scribus 1.5.4
  • identify confirms the original JPG and the PDFs are indeed CMYK
  • Imported into Scribus, it's visually obvious (dulled colors) that the PDF is CMYK
  • There are many related issues (a few migrated by me!) but none that address this specific issue

Version Info:

Original issue:

- Inkscape Version: 0.92.2/0.92.3
- Operating System: Ubuntu Xenial (16.04 LTS)

Tested on:

- Inkscape Version: 1.1-dev (cc619caa, 2020-09-10)/1.0.1(1.0.1+r73+1)
- Operating System: 1.1-dev (cc619caa, 2020-09-10)/Ubuntu 18.04.5 LTS