Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert many png's to multi-page tiff

Tags:

imagemagick

I've seen various posts around StackOverflow, but basically I want to do something along the lines of:

convert *.png new.tiff

And the tiff has a page per each png. So I want a single tiff, with many pages. This doesn't work, it only converts the first png found in the list. For what I'm doing, I actually need a multi-page tiff. Supposedly imagemagick does this.

(BTW, version is: 6.8.0-10 2013-03-03 Q16)

Any ideas?

like image 829
Kezzer Avatar asked Mar 06 '13 14:03

Kezzer


1 Answers

Finally figured it out. It seems you have to build from source to get this feature working correctly. I used all versions from homebrew without any luck. To do this make sure you get rid of any old versions, so do the following:

  1. brew uninstall imagemagick
  2. brew unlink imagemagick
  3. brew install imagemagick --build-from-source
  4. It might say that you need to link/unlink, just do brew unlink imagemagick && brew link imagemagick and it should work fine.

I'm very surprised this isn't documented more, specifically converting multiple images into a single multi-paged tiff. From here you can then do convert *.png mynewimg.tiff (if using globbing) if not you can do convert first.png second.png third.png mynewimg.tiff

It seems the only option is to build from source though, so if multi-paged tiffs aren't being generated then do the above.

like image 130
Kezzer Avatar answered Sep 21 '22 22:09

Kezzer