Join images vertically with convert -append

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
xpt
Posts: 59
Joined: 2010-10-06T20:18:24-07:00
Authentication code: 8675308

Join images vertically with convert -append

Post by xpt »

Hi,

I have bumped into a very strange problem -- The 'convert -append' command will give me a result that looks OK but prints bad.
I'm just joining 8 identical images vertically together, then print it out:

Code: Select all

convert clp.png clp.png clp.png clp.png clp.png clp.png clp.png clp.png -append page.png
display page.png 
convert page.png page.gif
lp page.gif
It displays perfectly but when printed, heavy black strips are all across the page.
What might be my problem?

I've upload my clp.png to
http://www.imgplace.com/img834/1738/35clp.png

Please try it out with your IM for me. Is it happening to you?

PS. My IM is imagemagick 6.6.2.6 from ubuntu.

Thanks a lot.
Last edited by xpt on 2011-11-21T15:28:07-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Join images vertically with convert -append

Post by fmw42 »

The following command worked fine form with IM 6.7.3.7 Q16 Mac OSX Tiger. And the displayed image looks fine.

convert 35clp.png 35clp.png 35clp.png 35clp.png 35clp.png 35clp.png 35clp.png 35clp.png -append 35clp_append.png

Note that PNG has undergone quite a few changes and improvements over many releases, some of which may have had bugs. So I would recommend that you upgrade if you can. See the changelog for PNG related changes. http://www.imagemagick.org/script/changelog.php
xpt
Posts: 59
Joined: 2010-10-06T20:18:24-07:00
Authentication code: 8675308

Re: Join images vertically with convert -append

Post by xpt »

The following command worked fine form with . . .
Thanks for your reply.

I think I've pin pointed the culprit. There has been an extra step converting from page.png to page.gif, and then prints page.gif. I've now corrected the OP. And I believe the converting is the cause of my problem.

Code: Select all

lp page.png
convert page.png page.gif
lp page.gif 
The page.png prints well, whereas page.gif doesn't.

I've uploaded them to
http://www.imgplace.com/img684/9971/26page.png
http://www.imgplace.com/img443/5673/80page.gif

Please see if the page.gif file prints well for you.

Thanks
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Join images vertically with convert -append

Post by fmw42 »

On my Mac the following works fine and prints fine.


convert 35clp.png 35clp.png 35clp.png 35clp.png 35clp.png 35clp.png 35clp.png 35clp.png -append 35clp_append.png
convert 35clp_append.png 35clp_append.gif


And your 80page.gif prints fine also
xpt
Posts: 59
Joined: 2010-10-06T20:18:24-07:00
Authentication code: 8675308

Re: Join images vertically with convert -append

Post by xpt »

It must be my general environment then. Thanks a lot Fred!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Join images vertically with convert -append

Post by fmw42 »

You don't need to save the png and then convert to gif. You can convert to gif right away, unless you want to save the png.

convert 35clp.png 35clp.png 35clp.png 35clp.png 35clp.png 35clp.png 35clp.png 35clp.png -append 35clp_append.gif

But note, like PNG, gif has had some bugs recently fixed also regarding black striping. Search the changelog and see if you can find out where or search the archives.

If you can upgrade your IM, you might be better off. Also you might want to upgrade your PNG delegate library if on Unix. I don't know how that works on Windows.
Post Reply