Aurelon Open API 8.1.1
Loading...
Searching...
No Matches
AOI_TIFFWriter.h
1/*
2 * AOI_TIFFWriter
3 * Copyright (c) 2008-2017 Aurelon BV. All rights reserved.
4 *
5 */
6#pragma once
7
8#include "./AOI_Types.h"
9
10namespace aur {
11 namespace ACPL {
12 class UString;
13 class FileSpec;
14 }
15}
16
17#define TIFF_Comp_None 0
18#define TIFF_Comp_CCITT 1
19#define TIFF_Comp_LZW 2
20
21#define TIFF_Platform_i386 uint16_t( 0x4949 )
22#define TIFF_Platform_PPC uint16_t( 0x4D4D )
23
24typedef struct tiff TIFF;
25
26#if ARCH_INTEL
27# define TIFF_This_Platform TIFF_Platform_i386
28#else
29# define TIFF_This_Platform TIFF_Platform_PPC
30#endif
31
32ExceptionCode AOIAPI AOI_WriteTIFF( const aur::ACPL::FileSpec& path, uint8_t compression, uint16_t platform,
33 AOI_ColorSpaceEnum colorSpace, uint16_t bitsPerPixel, uint32_t width, uint32_t height,
34 float dpiX, float dpiY, const void* imageData );
35
36class AOIAPI AOI_TIFFWriter
37{
38 TIFF* mTif;
39 ExceptionCode mErr;
40 uint32_t mWidth;
41 uint32_t mHeight;
42 uint32_t mNrOfPlanes;
43 uint16_t mBitsPerPixel;
44 uint32_t mRow;
45public:
46 AOI_TIFFWriter();
47 ~AOI_TIFFWriter();
48 ExceptionCode Init( const aur::ACPL::FileSpec& path, uint8_t compression, uint16_t platform,
49 AOI_ColorSpaceEnum colorSpace, uint16_t bitsPerPixel, uint32_t width, uint32_t height,
50 float dpiX, float dpiY );
51 ExceptionCode WriteData( uint32_t lines, const void* imageData );
52};
ExceptionCode AOIAPI AOI_WriteTIFF(const aur::ACPL::FileSpec &path, uint8_t compression, uint16_t platform, AOI_ColorSpaceEnum colorSpace, uint16_t bitsPerPixel, uint32_t width, uint32_t height, float dpiX, float dpiY, const void *imageData)
TIFF writer.