TinyTIFF
a lightweight C/C++ library for reading and writing TIFF files
Loading...
Searching...
No Matches
tinytiff_tools.hxx
1
/*
2
Copyright (c) 2008-2024 Jan W. Krieger (<jan@jkrieger.de>), German Cancer Research Center (DKFZ) & IWR, University of Heidelberg
3
4
This software is free software: you can redistribute it and/or modify
5
it under the terms of the GNU Lesser General Public License (LGPL) as published by
6
the Free Software Foundation, either version 3 of the License, or
7
(at your option) any later version.
8
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License
15
along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17
18
*/
19
20
21
#ifndef TINYTIFF_TOOLS_HXX
22
#define TINYTIFF_TOOLS_HXX
23
24
extern
"C"
{
25
#include "tinytiffwriter.h"
26
#include "tinytiffreader.h"
27
}
28
#include <string>
29
55
template
<
class
T>
56
struct
TinyTIFF_SampleFormatFromType
{
57
const
enum
TinyTIFFWriterSampleFormat
format=
TinyTIFFWriter_UInt
;
58
};
59
60
template
<>
61
struct
TinyTIFF_SampleFormatFromType
<float> {
62
const
enum
TinyTIFFWriterSampleFormat
format=
TinyTIFFWriter_Float
;
63
};
64
template
<>
65
struct
TinyTIFF_SampleFormatFromType
<double> {
66
const
enum
TinyTIFFWriterSampleFormat
format=
TinyTIFFWriter_Float
;
67
};
68
69
70
template
<>
71
struct
TinyTIFF_SampleFormatFromType
<int8_t> {
72
const
enum
TinyTIFFWriterSampleFormat
format=
TinyTIFFWriter_Int
;
73
};
74
template
<>
75
struct
TinyTIFF_SampleFormatFromType
<int16_t> {
76
const
enum
TinyTIFFWriterSampleFormat
format=
TinyTIFFWriter_Int
;
77
};
78
template
<>
79
struct
TinyTIFF_SampleFormatFromType
<int32_t> {
80
const
enum
TinyTIFFWriterSampleFormat
format=
TinyTIFFWriter_Int
;
81
};
82
83
84
#endif
// TINYTIFF_TOOLS_HXX
TinyTIFFWriterSampleFormat
TinyTIFFWriterSampleFormat
allows to specify in TinyTIFFWriter_open() the type of the data
Definition
tinytiffwriter.h:111
TinyTIFFWriter_Float
@ TinyTIFFWriter_Float
Definition
tinytiffwriter.h:114
TinyTIFFWriter_UInt
@ TinyTIFFWriter_UInt
Definition
tinytiffwriter.h:112
TinyTIFFWriter_Int
@ TinyTIFFWriter_Int
Definition
tinytiffwriter.h:113
TinyTIFF_SampleFormatFromType
this template allows to determine a value for TinyTIFFWriterSampleFormat from a given type T
Definition
tinytiff_tools.hxx:56
src
tinytiff_tools.hxx
Generated on Wed May 22 2024 18:28:01 for TinyTIFF by
1.9.8