svn-gvsig-desktop / tags / tmp_build_del / libraries / libjni-gdal-macosx / include / bsb_read.h @ 38629
History | View | Annotate | Download (3.53 KB)
1 | 8219 | nacho | /******************************************************************************
|
---|---|---|---|
2 | * $Id$
|
||
3 | *
|
||
4 | * Project: BSB Reader
|
||
5 | * Purpose: non-GDAL BSB API Declarations
|
||
6 | * Author: Frank Warmerdam, warmerdam@pobox.com
|
||
7 | *
|
||
8 | ******************************************************************************
|
||
9 | * Copyright (c) 2001, Frank Warmerdam
|
||
10 | *
|
||
11 | * Permission is hereby granted, free of charge, to any person obtaining a
|
||
12 | * copy of this software and associated documentation files (the "Software"),
|
||
13 | * to deal in the Software without restriction, including without limitation
|
||
14 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||
15 | * and/or sell copies of the Software, and to permit persons to whom the
|
||
16 | * Software is furnished to do so, subject to the following conditions:
|
||
17 | *
|
||
18 | * The above copyright notice and this permission notice shall be included
|
||
19 | * in all copies or substantial portions of the Software.
|
||
20 | *
|
||
21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||
22 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
23 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||
24 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
25 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||
26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||
27 | * DEALINGS IN THE SOFTWARE.
|
||
28 | ******************************************************************************
|
||
29 | *
|
||
30 | * $Log$
|
||
31 | * Revision 1.1 2006-10-23 06:25:39 nacho
|
||
32 | * *** empty log message ***
|
||
33 | *
|
||
34 | * Revision 1.1 2006/06/29 16:23:27 nacho
|
||
35 | * *** empty log message ***
|
||
36 | *
|
||
37 | * Revision 1.2 2006/01/09 12:50:13 nacho
|
||
38 | * *** empty log message ***
|
||
39 | *
|
||
40 | * Revision 1.1 2005/07/27 08:22:55 igbrotru
|
||
41 | * *** empty log message ***
|
||
42 | *
|
||
43 | * Revision 1.1 2004/12/28 14:06:59 igbrotru
|
||
44 | * *** empty log message ***
|
||
45 | *
|
||
46 | * Revision 1.1 2004/10/28 12:08:47 igbrotru
|
||
47 | * *** empty log message ***
|
||
48 | *
|
||
49 | * Revision 1.1 2004/09/27 08:27:48 igbrotru
|
||
50 | * *** empty log message ***
|
||
51 | *
|
||
52 | * Revision 1.1 2004/09/08 12:39:04 igbrotru
|
||
53 | * *** empty log message ***
|
||
54 | *
|
||
55 | * Revision 1.5 2002/11/04 04:26:45 warmerda
|
||
56 | * preliminary work on write support
|
||
57 | *
|
||
58 | * Revision 1.4 2002/07/19 22:05:15 warmerda
|
||
59 | * added support for NO1 (encrypted) files
|
||
60 | *
|
||
61 | * Revision 1.3 2002/07/19 20:32:57 warmerda
|
||
62 | * added nVersion to structure.
|
||
63 | *
|
||
64 | * Revision 1.2 2001/12/08 21:58:32 warmerda
|
||
65 | * save header
|
||
66 | *
|
||
67 | * Revision 1.1 2001/12/08 04:35:16 warmerda
|
||
68 | * New
|
||
69 | *
|
||
70 | */
|
||
71 | |||
72 | #ifndef _BSBREAD_H_INCLUDED
|
||
73 | #define _BSBREAD_H_INCLUDED
|
||
74 | |||
75 | #include "cpl_port.h" |
||
76 | |||
77 | CPL_C_START |
||
78 | |||
79 | typedef struct { |
||
80 | FILE *fp; |
||
81 | |||
82 | int nXSize;
|
||
83 | int nYSize;
|
||
84 | |||
85 | int nPCTSize;
|
||
86 | unsigned char *pabyPCT; |
||
87 | |||
88 | char **papszHeader;
|
||
89 | |||
90 | int *panLineOffset;
|
||
91 | |||
92 | int nColorSize;
|
||
93 | |||
94 | int nVersion; /* times 100 */ |
||
95 | |||
96 | int bNO1;
|
||
97 | |||
98 | int bNewFile;
|
||
99 | int nLastLineWritten;
|
||
100 | } BSBInfo; |
||
101 | |||
102 | BSBInfo CPL_DLL *BSBOpen( const char *pszFilename ); |
||
103 | int CPL_DLL BSBReadScanline( BSBInfo *psInfo, int nScanline, |
||
104 | unsigned char *pabyScanlineBuf ); |
||
105 | void CPL_DLL BSBClose( BSBInfo *psInfo );
|
||
106 | |||
107 | BSBInfo CPL_DLL *BSBCreate( const char *pszFilename, int nCreationFlags, |
||
108 | int nVersion, int nXSize, int nYSize ); |
||
109 | int CPL_DLL BSBWritePCT( BSBInfo *psInfo,
|
||
110 | int nPCTSize, unsigned char *pabyPCT ); |
||
111 | int CPL_DLL BSBWriteScanline( BSBInfo *psInfo,
|
||
112 | unsigned char *pabyScanlineBuf ); |
||
113 | |||
114 | CPL_C_END |
||
115 | |||
116 | |||
117 | #endif /* ndef _BSBREAD_H_INCLUDED */ |