Channel Packing Images Sequences

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
blanks
Posts: 1
Joined: 2018-10-05T09:09:46-07:00
Authentication code: 1152

Channel Packing Images Sequences

Post by blanks »

Hi, I have a situation where I have potentially hundreds of images in an animated frame sequence. I would like to pack the frames into the channels of new images.

For example:

input 1 becomes output 1 Red channel
input 2 becomes output 1 Green channel
input 3 becomes output 1 Blue channel
input 4 becomes output 1 Alpha channel
... but then....
input 5 becomes output 2 Red channel...and so on

An input folder with 100 frames packed into the R, G, B & A channels resulting in an output folder of only 25 images.

I think this should be possible, but I cant work out how. I use Imagemagick with .BAT files to pack sprite sheets and things, but I dont know how to do this.

I'm an artist, not a programmer so any advice or examples of this in windows batch style would be greatly appreciated.

Thanks you for any help you can offer.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Channel Packing Images Sequences

Post by snibgo »

Obviously, this will work only if your inputs are grayscale. The task is simple:

Code: Select all

magick in1.png in2.png in3.png in4.png -combine out1.png
Repeat for all your inputs.
snibgo's IM pages: im.snibgo.com
Post Reply