- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

# geo_simpletags.h

    00001 /******************************************************************************
    00002  * Copyright (c) 2008, Frank Warmerdam
    00003  *
    00004  * Permission is hereby granted, free of charge, to any person obtaining a
    00005  * copy of this software and associated documentation files (the "Software"),
    00006  * to deal in the Software without restriction, including without limitation
    00007  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
    00008  * and/or sell copies of the Software, and to permit persons to whom the
    00009  * Software is furnished to do so, subject to the following conditions:
    00010  *
    00011  * The above copyright notice and this permission notice shall be included
    00012  * in all copies or substantial portions of the Software.
    00013  *
    00014  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
    00015  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    00016  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
    00017  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    00018  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    00019  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    00020  * DEALINGS IN THE SOFTWARE.
    00021  *****************************************************************************
    00022  *
    00023  *  geo_simpletags.h
    00024  *
    00025  * Provides interface for a "simple tags io in memory" mechanism
    00026  * as an alternative to accessing a real tiff file using libtiff.
    00027  *
    00028  ****************************************************************************/
    00029
    00030 #ifndef __geo_simpletags_h_
    00031 #define __geo_simpletags_h_
    00032
    00033 #include "geotiff.h"
    00034
    00035 #if defined(__cplusplus)
    00036 extern "C" {
    00037 #endif
    00038
    00039 #define STT_SHORT   1
    00040 #define STT_DOUBLE  2
    00041 #define STT_ASCII   3
    00042
    00043 typedef struct {
    00044     int tag;
    00045     int count;
    00046     int type;
    00047     void *data;
    00048 } ST_KEY;
    00049
    00050 typedef struct {
    00051     int key_count;
    00052     ST_KEY *key_list;
    00053 } ST_TIFF;
    00054
    00055 typedef void *STIFF;
    00056
    00057 void CPL_DLL GTIFSetSimpleTagsMethods(TIFFMethod *method);
    00058
    00059 int CPL_DLL ST_SetKey( ST_TIFF *, int tag, int count,
    00060                        int st_type, void *data );
    00061 int CPL_DLL ST_GetKey( ST_TIFF *, int tag, int *count,
    00062                        int *st_type, void **data_ptr );
    00063
    00064 ST_TIFF CPL_DLL *ST_Create();
    00065 void CPL_DLL ST_Destroy( ST_TIFF * );
    00066
    00067 int CPL_DLL ST_TagType( int tag );
    00068
    00069 #if defined(__cplusplus)
    00070 }
    00071 #endif
    00072
    00073 #endif /* __geo_simpletags_h_ */