View Issue Details

IDProjectCategoryView StatusLast Update
0015957ScribusColor Managementpublic2020-04-05 19:37
Reporterale Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.5.6.svn 
Fixed in Version1.5.6.svn 
Summary0015957: Embedded ICC color profiles of PNG images are not detected during import
DescriptionThe embedded ICC color profile of an imported raster image is not detected.

I'm attaching the Png that was contained in the .sla uploaded by derAndere1 on Github:

https://github.com/scribusproject/scribus/issues/125

The issue on Github contains a few more details.
TagsNo tags attached.
PatchNo

Activities

ale

2019-11-19 14:23

manager  

original.PNG (1,685,088 bytes)

jghali

2019-11-19 15:20

administrator   ~0047107

PNG files are read by using Qt image reading functions which do not allow us to retrieve any embedded ICC profile. The only formats where we support retrieving embedded ICC profiles are JPEG, TIFF and PSD.

ale

2019-11-20 07:47

manager   ~0047108

mmm... since PNGs are more and more used for serious work, would it be possible to use a "real" png library for reading them?

jghali

2019-11-20 08:08

administrator   ~0047109

Yup, but not right now. I would rather see an intermediate solution where we would continue to do as now for reading image data, but have specific function for extracting embedded profile from png using libpng.

Also one tip: I've noticed that the original image is a 16bit image using a linear RGB profile. We have no support for exporting 16bit images to PDF without converting them to 8bit and image color management is anyway performed on 8bit data. So importing an image with an embedded linear RGB profile is asking for trouble.

davidrevoy

2019-12-16 17:43

reporter   ~0047276

Hey! Just to let you know; I discovered I was affected by this bug too for my Pepper&Carrot "big collection" book project. (Funny to see the PNG reported uses also Pepper&Carrot picture, that's cool). I'll switch my project to another input format to try to workaround.

I have no idea how color convertion behaves without a source profile to target the CMYK profile of my printer in this context and if it can explain the bad color I'm getting once printed so far.

jghali

2020-03-05 10:33

administrator   ~0047429

I did some tests with the new colorspace related functionalities in Qt 5.14. Unfortunately at this point it seems that the ICC profiles one can retrieve using these new functionalities are not consistent with the image data leading usually to excessively bright images. In fact during the tests I did, I got the expected result in a single case. In the case of the image attached to this issue, Qt could even not return the correct profile data. So at this point it seems these new Qt 5.14 functionalities are unusable.

jghali

2020-03-08 22:33

administrator   ~0047432

So in the end I used libpng directly so as to get the embedded icc profile. So now Scribus has a new direct dependency on libpng.
In order to get embedded profiles from PNGs when loading old documents, it will be necessary to reload images by clearing content first (Right click on item > Content > Clear) then import image again as usual.

Issue History

Date Modified Username Field Change
2019-11-19 14:23 ale New Issue
2019-11-19 14:23 ale File Added: original.PNG
2019-11-19 14:25 ale Description Updated
2019-11-19 15:20 jghali Note Added: 0047107
2019-11-19 15:21 jghali Summary embedded ICC color profiles of raster images are not detected during import => Embedded ICC color profiles of PNG images are not detected during import
2019-11-20 07:47 ale Note Added: 0047108
2019-11-20 08:08 jghali Note Added: 0047109
2019-12-16 17:43 davidrevoy Note Added: 0047276
2020-03-05 10:33 jghali Note Added: 0047429
2020-03-08 22:33 jghali Assigned To => jghali
2020-03-08 22:33 jghali Status new => resolved
2020-03-08 22:33 jghali Resolution open => fixed
2020-03-08 22:33 jghali Fixed in Version => 1.5.6.svn
2020-03-08 22:33 jghali Note Added: 0047432
2020-04-05 19:37 cbradney Status resolved => closed