2
0

tif_ovrcache.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. #ifndef TIF_OVRCACHE_H_INCLUDED
  35. #define TIF_OVRCACHE_H_INCLUDED
  36. #include "tiffio.h"
  37. #if defined(__cplusplus)
  38. extern "C" {
  39. #endif
  40. typedef struct
  41. {
  42. uint32 nXSize;
  43. uint32 nYSize;
  44. uint16 nBitsPerPixel;
  45. uint16 nSamples;
  46. uint16 nPlanarConfig;
  47. uint32 nBlockXSize;
  48. uint32 nBlockYSize;
  49. toff_t nBytesPerBlock;
  50. toff_t nBytesPerRow;
  51. int nBlocksPerRow;
  52. int nBlocksPerColumn;
  53. int nBlockOffset; /* what block is the first in papabyBlocks? */
  54. unsigned char *pabyRow1Blocks;
  55. unsigned char *pabyRow2Blocks;
  56. toff_t nDirOffset;
  57. TIFF *hTIFF;
  58. int bTiled;
  59. } TIFFOvrCache;
  60. TIFFOvrCache *TIFFCreateOvrCache( TIFF *hTIFF, toff_t nDirOffset );
  61. unsigned char *TIFFGetOvrBlock( TIFFOvrCache *psCache, int iTileX, int iTileY,
  62. int iSample );
  63. unsigned char *TIFFGetOvrBlock_Subsampled( TIFFOvrCache *psCache, int iTileX, int iTileY );
  64. void TIFFDestroyOvrCache( TIFFOvrCache * );
  65. void TIFFBuildOverviews( TIFF *, int, int *, int, const char *,
  66. int (*)(double,void*), void * );
  67. void TIFF_ProcessFullResBlock( TIFF *, int, int, int, int, int, int *, int,
  68. int, TIFFOvrCache **, uint32, uint32,
  69. unsigned char *, uint32, uint32,
  70. int, const char * );
  71. uint32 TIFF_WriteOverview( TIFF *, uint32, uint32, int, int, int, int, int,
  72. int, int, int, int, unsigned short *,
  73. unsigned short *, unsigned short *, int,
  74. int, int);
  75. #if defined(__cplusplus)
  76. }
  77. #endif
  78. #endif /* ndef TIF_OVRCACHE_H_INCLUDED */
  79. /*
  80. * Local Variables:
  81. * mode: c
  82. * c-basic-offset: 8
  83. * fill-column: 78
  84. * End:
  85. */