Bug 921336

Summary: cuneiform fails to read PNG file
Product: [Fedora] Fedora Reporter: Jonathan Kamens <h1k6zn2m>
Component: cuneiformAssignee: Dmitrij S. Kryzhevich <kryzhev>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: kryzhev, orion
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-26 04:07:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 720285    
Bug Blocks:    
Attachments:
Description Flags
PNG File that cuneiform can't process
none
equivalent JPG file that cuneiform can process none

Description Jonathan Kamens 2013-03-14 03:02:39 UTC
I generated the attached file foo.png as follows:

1. Write a line of text in oowriter.
2. Export to PDF.
3. pdftops
4. pstopnm -dpi=300
5. convert foo.ppm foo.png

When the resulting file is passed to cuneiform, it reports:

Cuneiform for Linux 1.1.0
PUMA_XFinalrecognition failed.

When I then convert the file to jpg ("convert foo.png foo.jpg"), also attached, cuneiform recognizes it with no trouble.

I discovered this while trying to use cuneiform through gscan2pdf, though I've boiled it down to a simple test case as outlined above. I've been told by the maintainer of gscan2pdf that cuneiform has no trouble with PNG files like this one on gentoo amd64. He theories that cuneiform on Fedora is linked against ImageMagick wrong, or against the wrong version of ImageMagick, or something, but that's just a theory. The version of ImageMagick in Fedora 18 is 6.7.7.5, which was released in May of last year, and there have been lots of changes since then, so his theory is plausible.

Comment 1 Jonathan Kamens 2013-03-14 03:03:09 UTC
Created attachment 709855 [details]
PNG File that cuneiform can't process

Comment 2 Jonathan Kamens 2013-03-14 03:03:59 UTC
Created attachment 709856 [details]
equivalent JPG file that cuneiform can process

Comment 3 Jonathan Kamens 2013-03-14 03:05:08 UTC
It is worth noting that the ImageMagick ChangeLog shows many PNG-related changes since the version of ImageMagick that cuneiform is linked against. http://www.imagemagick.org/script/changelog.php

Comment 4 Dmitrij S. Kryzhevich 2013-03-14 03:27:47 UTC
> that cuneiform on Fedora is linked against ImageMagick wrong

How it could be linked "wrong"? It is either linked nor not. ImageMagic issue - may be.

Did you send your file to gscan2pdf maintainer?

Comment 5 Jonathan Kamens 2013-03-14 03:32:16 UTC
(In reply to comment #4)
> > that cuneiform on Fedora is linked against ImageMagick wrong
> 
> How it could be linked "wrong"? It is either linked nor not.

I suspect that he meant either:

1. Could be an old version of ImageMagick (in fact, it _is_ an old version of ImageMagick, as I mentioned above, and see also the bugzilla ticket that I added as a dependency of this one).

2. Could have been linked against one of the ImageMagick forks with different / inferior PNG support.

In any case, what he meant is really irrelevant, since it is clear that Fedora 18 has an old version of ImageMagick and there have been many intervening PNG-related fixes to it. So the first thing to try to address this bug is a newer version of ImageMagick in Fedora.

> ImageMagic
> issue - may be.
> 
> Did you send your file to gscan2pdf maintainer?

Yes, of course, that's how he verified that it works on his (gentoo amd64, as I mentioned) system even though it doesn't work on mine.

Comment 6 Dmitrij S. Kryzhevich 2013-09-26 04:07:28 UTC
Works in F20 with new ImageMagic. Closed.