Conversion OR Annotate Bug

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
codazoda

Conversion OR Annotate Bug

Post by codazoda »

I'm having a problem that I think is a bug, but I'm not sure where the bug exists. I'm either getting a corrupted PNG from the annotate command or I'm getting a corrupted PDF when I combine two PNG images.

I'm doing a 3 step process.

1. Starting with two images
2. Add text to those images with -annotate
3. Combe the two images into a 2-page PDF.

The problem is that the resulting PDF shows page 1 then gives an error, "There was a problem reading this document (14)".

If, however, I combine the original GIF images, before adding text, I get a working 2-page PDF.

I have tried these steps on two different servers. One running CentOS the other Debian Etch. I ran the examples for this write-up under Etch and using ImageMagick 6.2.4 02/10/07 Q16.

Reproducing The Problem

Step 1

The files I start with are online at the URLs below:
https://secure.utahfastpass.org/admin/U ... yForm2.gif
https://secure.utahfastpass.org/admin/U ... yForm3.gif

I place those files in my /tmp directory.

Step 2

I annotate the first file (Form2) with the following command. This just does a bunch of annotations.

Code: Select all

convert /tmp/UFP2008EntryForm2.gif -pointsize 20 -fill blue -annotate +154+382 "Joel Dare" -annotate +166+416 "My Address" -annotate +131+447 "Roy" -annotate +644+447 "UT" -annotate +990+447 "84067" -annotate +152+480 "801-555-1212" -annotate +634+480 "801-555-3434" -annotate +1011+480 "800-555-9898" -annotate +128+511 "800-555-7676" -annotate +648+511 "joel@example.com" -annotate +85+598 "None; None; None" -annotate +726+659 "300" -annotate +441+691 "60" -annotate +604+691 "40" -annotate +786+691 "0" -annotate +361+717 "95" -annotate +510+767 "X" -annotate +873+767 "2007-12-25" -annotate +150+947 "Bob Doe" -annotate +746+947 "801-555-1212" -annotate +204+1168 "1976-04-06" -annotate +734+1168 "None" -annotate +271+1202 "None" -annotate +335+1232 "None" -annotate +254+1265 "Kim Doe, PA" -annotate +877+1265 "801-555-9876" /tmp/UFP2008-Pg2-1000.png
Next, I annotate the second (Form3) with the following command.

Code: Select all

convert /tmp/UFP2008EntryForm3.gif -pointsize 20 -fill blue -annotate +154+382 "Joel Dare" -annotate +166+416 "My Address" -annotate +131+447 "Roy" -annotate +644+447 "UT" -annotate +990+447 "84067" -annotate +152+480 "801-555-1212" -annotate +634+480 "801-555-3434" -annotate +1011+480 "800-555-9898" -annotate +128+511 "800-555-7676" -annotate +648+511 "joel@example.com" -annotate +85+598 "None; None; None" -annotate +726+659 "300" -annotate +441+691 "60" -annotate +604+691 "40" -annotate +786+691 "0" -annotate +361+717 "95" -annotate +510+767 "X" -annotate +873+767 "2007-12-25" -annotate +150+947 "Bob Doe" -annotate +746+947 "801-555-1212" -annotate +204+1168 "1976-04-06" -annotate +734+1168 "None" -annotate +271+1202 "None" -annotate +335+1232 "None" -annotate +254+1265 "Kim Doe, PA" -annotate +877+1265 "801-555-9876" /tmp/UFP2008-Pg3-1000.png
Step 3

Finally, I combine the resulting 2 images into a 2-page PDF with the following command.

Code: Select all

convert -density 150 /tmp/UFP2008-Pg2-1000.png /tmp/UFP2008-Pg3-1000.png /tmp/UFP2008-1000.pdf
The result, UFP2008-1000.pdf, only has 1 page and reports an error (after a few minutes) when opened in Adobe Reader.
codazoda

Re: Conversion OR Annotate Bug

Post by codazoda »

Under CentOS I'm using version 6.2.8, same result there.
codazoda

Re: Conversion OR Annotate Bug

Post by codazoda »

No idea's on this? Can anyone confirm that the same happens to them with my test files?

You can test quickly by downloading the two files I referred to above, save those in your /tmp directory, then run the 3 commands.


Joel
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Conversion OR Annotate Bug

Post by el_supremo »

I tried those commands on Windows XP with IM 6.3.5 and they produce a 2-page PDF. The only problem is that the added text on the second page isn't aligned correctly.

Pete
Post Reply