TinyTIFF
a lightweight C/C++ library for reading and writing TIFF files
Loading...
Searching...
No Matches
tinytiffwriter.h
1/*
2 Copyright (c) 2008-220 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
22
23
24#ifndef TINYTIFFWRITER_H
25#define TINYTIFFWRITER_H
26
27#include "tinytiff_export.h"
28#include "tinytiff_defs.h"
29#include <stdint.h>
30
50typedef struct TinyTIFFWriterFile TinyTIFFWriterFile; // forward
51
52
53
54#ifdef __cplusplus
55extern "C" {
56#endif
57
61 TINYTIFF_EXPORT const char* TinyTIFFWriter_getVersion();
62
66 TINYTIFF_EXPORT int TinyTIFFWriter_getMaxDescriptionTextSize();
67
75 TINYTIFF_EXPORT const char* TinyTIFFWriter_getLastError(TinyTIFFWriterFile* tiff);
76
83 TINYTIFF_EXPORT int TinyTIFFWriter_wasError(TinyTIFFWriterFile* tiff);
84
91 TINYTIFF_EXPORT int TinyTIFFWriter_success(TinyTIFFWriterFile* tiff);
92
105
116
137 TINYTIFF_EXPORT TinyTIFFWriterFile* TinyTIFFWriter_open(const char* filename, uint16_t bitsPerSample, enum TinyTIFFWriterSampleFormat sampleFormat, uint16_t samples, uint32_t width, uint32_t height, enum TinyTIFFWriterSampleInterpretation sampleInterpretation);
138
139
140
158 TINYTIFF_EXPORT int TinyTIFFWriter_writeImageMultiSample(TinyTIFFWriterFile* tiff, const void* data, enum TinyTIFFSampleLayout inputOrganisation, enum TinyTIFFSampleLayout outputOrganization);
159
160
184 TINYTIFF_EXPORT int TinyTIFFWriter_writeImagePlanarReorder(TinyTIFFWriterFile* tiff, const void* data);
185
186
209 TINYTIFF_EXPORT int TinyTIFFWriter_writeImageChunkyReorder(TinyTIFFWriterFile* tiff, const void* data);
210
211
230 TINYTIFF_EXPORT int TinyTIFFWriter_writeImage(TinyTIFFWriterFile* tiff, const void* data);
231
254 TINYTIFF_EXPORT void TinyTIFFWriter_close_withmetadatadescription(TinyTIFFWriterFile* tiff, double pixel_width, double pixel_height, double frametime, double deltaz);
255
264 TINYTIFF_EXPORT void TinyTIFFWriter_close(TinyTIFFWriterFile* tiff);
265
266
276 TINYTIFF_EXPORT void TinyTIFFWriter_close_withdescription(TinyTIFFWriterFile* tiff, const char* imageDescription);
277#ifdef __cplusplus
278}
279#endif
280
281#endif // TINYTIFFWRITER_H
282
TINYTIFF_EXPORT const char * TinyTIFFWriter_getVersion()
returns the version number of TinyTIFFReader
Definition tinytiffwriter.c:1071
TinyTIFFWriterSampleInterpretation
allows to specify in TinyTIFFWriter_open() how to interpret the image channels
Definition tinytiffwriter.h:98
TINYTIFF_EXPORT int TinyTIFFWriter_wasError(TinyTIFFWriterFile *tiff)
returns TRUE (non-zero) when there was an error in the last function call, or FALSE (zero) if there w...
Definition tinytiffwriter.c:1058
TINYTIFF_EXPORT int TinyTIFFWriter_writeImageChunkyReorder(TinyTIFFWriterFile *tiff, const void *data)
write a new image to the give TIFF file, in planar configuration, i.e. the image data is reorganized ...
Definition tinytiffwriter.c:1037
TINYTIFF_EXPORT int TinyTIFFWriter_writeImage(TinyTIFFWriterFile *tiff, const void *data)
Write a new image to the give TIFF file, in chunky configuration, expects the data to be chunky too....
Definition tinytiffwriter.c:1042
TINYTIFF_EXPORT int TinyTIFFWriter_writeImageMultiSample(TinyTIFFWriterFile *tiff, const void *data, enum TinyTIFFSampleLayout inputOrganisation, enum TinyTIFFSampleLayout outputOrganization)
write a new image to the give TIFF file. the image ist stored in separate planes or planar configurat...
Definition tinytiffwriter.c:895
TINYTIFF_EXPORT void TinyTIFFWriter_close(TinyTIFFWriterFile *tiff)
close a given TIFF file
Definition tinytiffwriter.c:1047
TINYTIFF_EXPORT int TinyTIFFWriter_writeImagePlanarReorder(TinyTIFFWriterFile *tiff, const void *data)
write a new image to the give TIFF file, in planar configuration, i.e. the image data is reorganized ...
Definition tinytiffwriter.c:1032
TINYTIFF_EXPORT TinyTIFFWriterFile * TinyTIFFWriter_open(const char *filename, uint16_t bitsPerSample, enum TinyTIFFWriterSampleFormat sampleFormat, uint16_t samples, uint32_t width, uint32_t height, enum TinyTIFFWriterSampleInterpretation sampleInterpretation)
create a new TIFF file
Definition tinytiffwriter.c:704
TINYTIFF_EXPORT const char * TinyTIFFWriter_getLastError(TinyTIFFWriterFile *tiff)
returns a pointer to the last error message
Definition tinytiffwriter.c:1052
TINYTIFF_EXPORT void TinyTIFFWriter_close_withdescription(TinyTIFFWriterFile *tiff, const char *imageDescription)
close a given TIFF file and write the given string into the IMageDescription tag of the first frame i...
Definition tinytiffwriter.c:812
TinyTIFFWriterSampleFormat
allows to specify in TinyTIFFWriter_open() the type of the data
Definition tinytiffwriter.h:111
TINYTIFF_EXPORT void TinyTIFFWriter_close_withmetadatadescription(TinyTIFFWriterFile *tiff, double pixel_width, double pixel_height, double frametime, double deltaz)
close a given TIFF file
Definition tinytiffwriter.c:852
TINYTIFF_EXPORT int TinyTIFFWriter_getMaxDescriptionTextSize()
maximum size of the imageDescription field in the first frame (including trailing 0,...
Definition tinytiffwriter.c:68
TINYTIFF_EXPORT int TinyTIFFWriter_success(TinyTIFFWriterFile *tiff)
returns TINYTIFF_TRUE (non-zero) when there was no error in the last function call,...
Definition tinytiffwriter.c:1064
@ TinyTIFFWriter_AutodetectSampleInterpetation
Definition tinytiffwriter.h:99
@ TinyTIFFWriter_Greyscale
Definition tinytiffwriter.h:100
@ TinyTIFFWriter_RGB
Definition tinytiffwriter.h:102
@ TinyTIFFWriter_RGBA
Definition tinytiffwriter.h:103
@ TinyTIFFWriter_GreyscaleAndAlpha
Definition tinytiffwriter.h:101
@ TinyTIFFWriter_Float
Definition tinytiffwriter.h:114
@ TinyTIFFWriter_UInt
Definition tinytiffwriter.h:112
@ TinyTIFFWriter_Int
Definition tinytiffwriter.h:113
TinyTIFFSampleLayout
describes the layout of multi-sample images in memory
Definition tinytiff_defs.h:73
this struct represents a TIFF file
Definition tinytiffwriter.c:103
uint32_t width
width of the frames
Definition tinytiffwriter.c:125
uint16_t samples
number of samples of the frames
Definition tinytiffwriter.c:133
uint32_t height
height of the frames
Definition tinytiffwriter.c:127