AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
March 2012

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

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

2012.03.30 15:32 "writing PLANAR_CONFIG SEPARATE images", by Richard Nolde

On 03/29/2012 11:00 AM, tiff-request@lists.maptools.org wrote:
>  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
I'm in the middle of something so I cannot give details here, but look
at the function writeBufferToSeparateStrips  and the code it calls in
the tiffcrop.c source. Tiffcrop processes all documents internally in a
buffer as interleaved contiguous samples for all planes so it has to
export them back to separate planes for your case. The routine called by
the writeBufferToSeparateStrips after

  extractContigSamplesToBuffer(obuf, src, nrows, width, s, spp, bps,

is

  TIFFWriteEncodedStrip(out, strip++, obuf, stripsize)

  You might also find the code that you want in tiffcp, but it is limited
in regard to the samples per pixel that it handles for some image
configurations.

My notes for the writeBufferToSeparateStrips function contain the
following. The second sentence is the key to PLANAR_CONFIG SEPARATE. You
have to build the proper buffer to pass the right samples to be written
into the each strip so that this requirement is met. That is what my
extract routine does.
/*  Libtiff internals seem to depend on all data for a given sample
  * being contiguous within a strip or tile when PLANAR_CONFIG is
  * separate. All strips or tiles of a given plane are written
  * before any strips or tiles of a different plane are stored.
  */

Richard