MrSID Decode SDK for Raster Reference Manual  9.5.4.4709
BMPImageWriter.h
Go to the documentation of this file.
1 /* $Id$ */
2 /* //////////////////////////////////////////////////////////////////////////
3 // //
4 // This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, //
5 // Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
6 // prohibited. Access to and use of this code is permitted only under //
7 // license from LizardTech, Inc. Portions of the code are protected by //
8 // US and foreign patents and other filings. All Rights Reserved. //
9 // //
11 /* PUBLIC */
12 
13 #ifndef BMPIMAGEWRITER_H
14 #define BMPIMAGEWRITER_H
15 
16 // lt_lib_mrsid_core
17 #include "lti_geoFileImageWriter.h"
18 
19 // lt_lib_utils
20 #include "lti_imageWriter.h"
21 
22 
24 
25 #if defined(LT_COMPILER_MS)
26  #pragma warning(push,4)
27 #endif
28 
29 class LTReusableBuffer;
31 
38 {
39  LT_DISALLOW_COPY_CONSTRUCTOR(BMPImageWriter);
40 public:
41  BMPImageWriter(void);
42  ~BMPImageWriter(void);
43 
45 
46  LT_STATUS writeBegin(const LTIScene& scene);
47  LT_STATUS writeStrip(LTISceneBuffer& stripBuffer, const LTIScene& stripScene);
49 
50 private:
51  LT_STATUS checkImpedance() const;
52 
53  LT_STATUS normalizeProperties(lt_uint32 width, lt_uint32 height);
54  LT_STATUS initFile(lt_uint32 width, lt_uint32 height);
55  LT_STATUS writeHeaders(lt_uint32 width, lt_uint32 height);
56  LT_STATUS initBitmapHeader(lt_uint32 width, lt_uint32 height);
57  LT_STATUS initEndian();
58  LT_STATUS writeStrip(lt_uint32 stripHeight,
59  const lt_uint8* buf);
60 
61  lt_uint32 m_alignedRowBytes;
62  lt_uint32 m_unalignedRowBytes;
63  lt_uint8* m_padding;
64  lt_uint32 m_padsize;
65 
66  struct bitmapFileHeaderType;
67  struct bitmapHeaderType;
68 
69  bitmapFileHeaderType* m_bmpFileHeader;
70  bitmapHeaderType* m_bmpHeader;
71 
72  // This will provide a marker so the image doesn't write over itself
73  // I need to know how far back to seek.
74  lt_int32 m_seekBackTo;
75 
76  LTReusableBuffer* m_stripBuffer;
77 };
78 
79 
81 
82 #if defined(LT_COMPILER_MS)
83  #pragma warning(pop)
84 #endif
85 
86 #endif // BMPIMAGEWRITER_H
representation of a scene
Definition: lti_scene.h:64
class for writing geographic images to files or streams
LT_STATUS writeBegin(const LTIScene &scene)
begin an encode (write) operation
combine N different bands from M images into one N-banded image
#define LT_END_NAMESPACE(theNameSpace)
compiler does not support namespaces
Definition: lt_define.h:85
BMPImageWriter(void)
signed int lt_int32
signed 32-bit integer
Definition: lt_types.h:52
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:39
LT_STATUS writeEnd()
complete an encode (write) operation
LT_STATUS initialize(LTIImageStage *image)
class to hold data passed between image stages
writes an image stage to a Windows BMP file
~BMPImageWriter(void)
abstract class for decoding from an image
#define LT_BEGIN_NAMESPACE(theNameSpace)
compiler does not support namespaces
Definition: lt_define.h:84
unsigned int lt_uint32
unsigned 32-bit integer
Definition: lt_types.h:54
unsigned char lt_uint8
unsigned 8-bit integer
Definition: lt_types.h:46
LT_STATUS writeStrip(LTISceneBuffer &stripBuffer, const LTIScene &stripScene)
encode one strip of the scene

LizardTech