MrSID Decode SDK for Raster Reference Manual  9.5.5.5244
BMPImageWriter.h
Go to the documentation of this file.
1 //
2 // This code is property of Celartem, Inc dba Extensis.
3 // Copyright (c) 1995-2023. All rights reserved.
4 // Use permitted only under license from Extensis.
5 //
6 /* PUBLIC */
7 
8 #ifndef BMPIMAGEWRITER_H
9 #define BMPIMAGEWRITER_H
10 
11 // lt_lib_mrsid_core
12 #include "lti_geoFileImageWriter.h"
13 
14 // lt_lib_utils
15 #include "lti_imageWriter.h"
16 
17 
18 LT_BEGIN_LIZARDTECH_NAMESPACE
19 
20 class LTReusableBuffer;
22 
29 {
30  LT_DISALLOW_COPY_CONSTRUCTOR(BMPImageWriter);
31 public:
34 
36 
37  LT_STATUS writeBegin(const LTIScene& scene);
38  LT_STATUS writeStrip(LTISceneBuffer& stripBuffer, const LTIScene& stripScene);
40 
41 private:
42  LT_STATUS checkImpedance() const;
43 
44  LT_STATUS normalizeProperties(lt_uint32 width, lt_uint32 height);
45  LT_STATUS initFile(lt_uint32 width, lt_uint32 height);
46  LT_STATUS writeHeaders(lt_uint32 width, lt_uint32 height);
47  LT_STATUS initBitmapHeader(lt_uint32 width, lt_uint32 height);
48  LT_STATUS initEndian();
49  LT_STATUS writeStrip(lt_uint32 stripHeight,
50  const lt_uint8* buf);
51 
52  lt_uint32 m_alignedRowBytes;
53  lt_uint32 m_unalignedRowBytes;
54  lt_uint8* m_padding;
55  lt_uint32 m_padsize;
56 
57  struct bitmapFileHeaderType;
58  struct bitmapHeaderType;
59 
60  bitmapFileHeaderType* m_bmpFileHeader;
61  bitmapHeaderType* m_bmpHeader;
62 
63  // This will provide a marker so the image doesn't write over itself
64  // I need to know how far back to seek.
65  lt_int32 m_seekBackTo;
66 
67  LTReusableBuffer* m_stripBuffer;
68 };
69 
70 
71 LT_END_LIZARDTECH_NAMESPACE
72 
73 #endif // BMPIMAGEWRITER_H
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:30
unsigned char lt_uint8
unsigned 8-bit integer
Definition: lt_types.h:36
unsigned int lt_uint32
unsigned 32-bit integer
Definition: lt_types.h:44
signed int lt_int32
signed 32-bit integer
Definition: lt_types.h:42
writes an image stage to a Windows BMP file
LT_STATUS writeStrip(LTISceneBuffer &stripBuffer, const LTIScene &stripScene)
encode one strip of the scene
LT_STATUS writeBegin(const LTIScene &scene)
begin an encode (write) operation
LT_STATUS initialize(LTIImageStage *image)
~BMPImageWriter(void)
LT_STATUS writeEnd()
complete an encode (write) operation
BMPImageWriter(void)
combine N different bands from M images into one N-banded image
class for writing geographic images to files or streams
abstract class for decoding from an image
representation of a scene
Definition: lti_scene.h:60
class to hold data passed between image stages

Extensis