Bug 1190216 - tiff2pdf generates pdf files with wrong colors when viewed with evince
Summary: tiff2pdf generates pdf files with wrong colors when viewed with evince
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libtiff
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Hracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-06 16:42 UTC by Laurent Charrière
Modified: 2015-12-02 23:51 UTC (History)
1 user (show)

Fixed In Version: libtiff-4.0.3-21.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-02 08:41:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Sample TIFF image (123.27 KB, image/tiff)
2015-02-06 16:45 UTC, Laurent Charrière
no flags Details
Converted PDF file with wrong colors (10.09 KB, application/pdf)
2015-02-06 16:46 UTC, Laurent Charrière
no flags Details
Patch that sets ColorTransform to the correct value (539 bytes, patch)
2015-02-06 16:48 UTC, Laurent Charrière
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Novell 599475 0 None None None Never

Description Laurent Charrière 2015-02-06 16:42:11 UTC
Description of problem:
tiff2pdf, when passed the -j option to use JPEG compression, generates PDF files
with wrong colors. The issue is that tiff2pdf is setting the /ColorTransform field to 0 in /DecodeParams when it should be set to 1.

Version-Release number of selected component (if applicable):
4.0.3, probably every other version before

How reproducible:
100% reproducible

Steps to Reproduce:
1. tiff2pdf -o foo.pdf -j foo.tiff
2. evince foo.pdf

Actual results:
Colors in foo.pdf are completely wrong compared to foo.tiff

Expected results:
Colors are the same in both images

Additional info:
* If one edits (e.g. in emacs) the pdf file to set ColorTransform to 1 instead of 0, the colors are displayed correctly.
* Some PDF viewers (e.g. firefox bult-in viewer) don't show the problem, but it's really a bug in the viewer.
* This bug has been reported in various other distributions. Ubuntu bug 194295 reported the bug as fixed upstream in 4.0, but that is not the case. OpenSUSE bug 599475 has the correct fix, but the fix didn't make it upstream.

Comment 1 Laurent Charrière 2015-02-06 16:45:39 UTC
Created attachment 988966 [details]
Sample TIFF image

Sample TIFF image (created with ImageMagick's convert from http://en.wikipedia.org/wiki/Testcard#mediaviewer/File:Tpulse.jpg, a public domain test card).

Comment 2 Laurent Charrière 2015-02-06 16:46:41 UTC
Created attachment 988967 [details]
Converted PDF file with wrong colors

Comment 3 Laurent Charrière 2015-02-06 16:48:02 UTC
Created attachment 988968 [details]
Patch that sets ColorTransform to the correct value

Comment 4 Petr Hracek 2015-10-26 08:38:24 UTC
I have reported the bug to upstream.
http://bugzilla.maptools.org/show_bug.cgi?id=2526

It seems that it is already fixed in libtiff-4.0.6.

I will do the patch to old releases.

Comment 5 Petr Hracek 2015-10-26 12:28:25 UTC
this is fixed for F22 branch.
http://pkgs.fedoraproject.org/cgit/libtiff.git/commit/?h=f22&id=640cfa0701ddfea3e354ae59f7a3bbee6a909ea4

F21 release will be close soon. So I will not merge it there.

Comment 6 Fedora Update System 2015-10-26 12:39:56 UTC
libtiff-4.0.3-21.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-7517bd0bc5

Comment 7 Fedora Update System 2015-10-28 20:25:40 UTC
libtiff-4.0.3-21.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update libtiff'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-7517bd0bc5

Comment 8 Fedora End Of Life 2015-11-04 16:00:31 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Fedora End Of Life 2015-12-02 08:41:14 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 10 Fedora Update System 2015-12-02 23:51:07 UTC
libtiff-4.0.3-21.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.