]> git.saurik.com Git - wxWidgets.git/blame - src/tiff/contrib/addtiffo/tif_ovrcache.h
Correct Mac OX/iPhone check in libpng.
[wxWidgets.git] / src / tiff / contrib / addtiffo / tif_ovrcache.h
CommitLineData
8414a40c
VZ
1/******************************************************************************
2 * tif_ovrcache.h,v 1.3 2005/05/25 09:03:16 dron Exp
3 *
4 * Project: TIFF Overview Builder
5 * Purpose: Library functions to maintain two rows of tiles or two strips
6 * of data for output overviews as an output cache.
7 * Author: Frank Warmerdam, warmerdam@pobox.com
8 *
9 * This code could potentially be used by other applications wanting to
10 * manage a once-through write cache.
11 *
12 ******************************************************************************
13 * Copyright (c) 2000, Frank Warmerdam
14 *
15 * Permission is hereby granted, free of charge, to any person obtaining a
16 * copy of this software and associated documentation files (the "Software"),
17 * to deal in the Software without restriction, including without limitation
18 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
19 * and/or sell copies of the Software, and to permit persons to whom the
20 * Software is furnished to do so, subject to the following conditions:
21 *
22 * The above copyright notice and this permission notice shall be included
23 * in all copies or substantial portions of the Software.
24 *
25 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
26 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
28 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
30 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
31 * DEALINGS IN THE SOFTWARE.
32 ******************************************************************************
33 */
34
35#ifndef TIF_OVRCACHE_H_INCLUDED
36#define TIF_OVRCACHE_H_INCLUDED
37
38#include "tiffio.h"
39
40#if defined(__cplusplus)
41extern "C" {
42#endif
43
44typedef struct
45{
46 uint32 nXSize;
47 uint32 nYSize;
48
49 uint16 nBitsPerPixel;
50 uint16 nSamples;
51 uint16 nPlanarConfig;
52 uint32 nBlockXSize;
53 uint32 nBlockYSize;
54 uint32 nBytesPerBlock;
55 uint32 nBytesPerRow;
56
57 int nBlocksPerRow;
58 int nBlocksPerColumn;
59
60 int nBlockOffset; /* what block is the first in papabyBlocks? */
61 unsigned char *pabyRow1Blocks;
62 unsigned char *pabyRow2Blocks;
63
64 int nDirOffset;
65 TIFF *hTIFF;
66 int bTiled;
67
68} TIFFOvrCache;
69
70TIFFOvrCache *TIFFCreateOvrCache( TIFF *hTIFF, int nDirOffset );
71unsigned char *TIFFGetOvrBlock( TIFFOvrCache *psCache, int iTileX, int iTileY,
72 int iSample );
73unsigned char *TIFFGetOvrBlock_Subsampled( TIFFOvrCache *psCache, int iTileX, int iTileY );
74void TIFFDestroyOvrCache( TIFFOvrCache * );
75
76void TIFFBuildOverviews( TIFF *, int, int *, int, const char *,
77 int (*)(double,void*), void * );
78
79void TIFF_ProcessFullResBlock( TIFF *hTIFF, int nPlanarConfig,
80 int bSubsampled, int nHorSamples, int nVerSamples,
81 int nOverviews, int * panOvList,
82 int nBitsPerPixel,
83 int nSamples, TIFFOvrCache ** papoRawBIs,
84 int nSXOff, int nSYOff,
85 unsigned char *pabySrcTile,
86 int nBlockXSize, int nBlockYSize,
87 int nSampleFormat, const char * pszResampling );
88
89uint32 TIFF_WriteOverview( TIFF *, int, int, int, int, int, int, int,
90 int, int, int, int, unsigned short *,
91 unsigned short *, unsigned short *, int,
92 int, int);
93
94
95
96#if defined(__cplusplus)
97}
98#endif
99
100#endif /* ndef TIF_OVRCACHE_H_INCLUDED */
101