AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2012.03.27 15:22 "[Tiff] Multiplanar image", by Jorge Martin
2012.03.27 17:28 "Re: [Tiff] Tiff Digest, Vol 94, Issue 7", by Richard Nolde
2012.03.29 13:46 "Re: [Tiff] Tiff Digest, Vol 94, Issue 7", by Jorge Martin
2012.03.30 15:32 "[Tiff] writing PLANAR_CONFIG SEPARATE images", by Richard Nolde

2012.03.29 13:46 "Re: [Tiff] Tiff Digest, Vol 94, Issue 7", by Jorge Martin

Hello,

In the case we assume all the planes are contiguous, one over the other, in the buffer that we send to the function TIFFWriteEncodedStrip. Have we need to insert any kind of mark between each plane or the function is smart enough to recognise the different planes with the PlanarConfiguratio Tag?

Best Regards,

Jorge

2012/3/27 Richard Nolde <richard.nolde@cybox.com>

> Today's Topics:
>
> 1. Multiplanar image (Jorge Martin)
> ----------------------------------------------------------------------
> Message: 1
> Date: Tue, 27 Mar 2012 17:22:04 +0200
> From: Jorge Martin<jormarfe@gmail.com>
> Subject: [Tiff] Multiplanar image

We are trying to develop a tiff reader/writer but we have some doubts with the multiplanar=separated images:

We found one image which their separated planes are written in this way:

| - - - - - - - |

|   1   |   2   |

|   3   |   4   |

| - - - - - - - |

So we need a buffer with these dimensions

Image length = Total Rows X 2

Image width = Total columns X 2

But we was thinking that the image has to be like this

| - - - |

|   1   |

|   2   |

|   3   |

|   4   |

| - - - |

There is a standard way to write these kinds of images?

I believe that libtiff makes some assumptions about the ordering of PLANAR_CONFIG=SEPARATE data. At least for writing, all the data for one plane must come before the data for the next plane, as suggested by your second diagram. You can try tiffcrop, which handles input files that have separate planes and converts the data into interleaved format in memory for all processing. If it can handle the input file, and you want separate planes in the output file, it will write out the planes as in your second diagram or in interleaved format if you so indicate. I don't remember if tiffcp will do this for you as well. You could send me a sample image to test if you like.