image-processingtiffinterleave

Change pixel order of a .tiff file from rgbrgb to rrbbgg (interleaved to non-interleaved)


I have been trying to figure out a way to create non-interleaved .tiff files, as described here: https://questionsomething.wordpress.com/2012/07/26/databending-using-audacity-effects/ (under the heading of "The photographic base").

It seems like it's a trivial thing using photoshop, but I'm on linux and would hate to get myself a copy just for this one option. If anyone knows of a way, be it via imagemagick, hacking the gimp or some obscure program, I'd be glad for any suggestions.


Solution

  • If TIFF parlance, you have a file in contiguous planar configuration, and want separate planar configuration.

    The tiffcp utility that comes with LibTIFF can do this for you. Use the -p separate option:

    tiffcp -p separate src.tif dest.tif
    

    See the man page.