/*------------------------------------------------------------------------------
 src/plugin/djImageIoTiff/base.h
 
 Copyright (c) 2004-2006 Darby Johnston.
 All rights reserved.
 Use is subject to license terms.
 
 Requirements:
 
 * libtiff - http://www.remotesensing.org/libtiff
 
 Supported:
 
 * Channels: l, la, rgb, rgba.
 * Bit depths: u8, u16, f32.
 * Attributes: interleaved or planar channels, data compression.
------------------------------------------------------------------------------*/

#ifndef DJ_IMAGE_IO_TIFF_BASE_H
#define DJ_IMAGE_IO_TIFF_BASE_H
#include <djBase.h>
#include <tiffio.h>

namespace djImageIoTiff {
using namespace dj;

// Plugin name.
//
inline const Str name() { return "TIFF"; }

// File extensions.
//
inline const StrList extensionList()
  { return StrList() + Str(".tiff") + Str(".tif"); }

// File header.
//
class Header {
public:

  Header();

  uint32 width, height;
  uint16 photometric, samples, sampleDepth, sampleFormat;
  uint16 * extraSamples, extraSamplesSize;
  uint16 orient, compress, channels;
  uint16 * colormap [3];
};

// Debugging.
//
void dbg(const Header &);

}

#endif
