SDC C-Project CF Review 프로그램
kojingeun
2023-07-14 f77e8008cac062596058fca2aeddda62b80bedbf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
// InspectionBuffer.h: interface for the CMosisBuffer class.
//
//////////////////////////////////////////////////////////////////////
 
#if !defined(AFX_INSPECTIONBUFFER_H__16133B59_E7ED_46D2_9FCE_FF4D0A62B052__INCLUDED_)
#define AFX_INSPECTIONBUFFER_H__16133B59_E7ED_46D2_9FCE_FF4D0A62B052__INCLUDED_
 
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
 
struct stBufferSize;
class CMosisBuffer;
class CShiftBuffer;
class CCropBuffer;
class CCopyBuffer;
class CFileBuffer;
class COwnerBuffer;
struct stImageFileHeader;
class CBufferAttach;
class CFrameSave;
class CFrameSave_OneFile;
class CImageBuffer;
 
 
// ¹öÆÛÀÇ »çÀÌÁî °ü·Ã Á¤º¸ ±¸Á¶Ã¼.
struct AFX_EXT_CLASS stBufferSize
{
    int        m_Width, m_Height;
    int        m_DataWidth;
public:
    stBufferSize(int width= 0, int height= 0)
    {
        SetSize(width, height);
    }
    stBufferSize(stBufferSize& size)
    {
        SetSize(size.GetWidth(), size.GetHeight());
    }
    stBufferSize(stBufferSize* pSize)
    {
        SetSize(pSize->GetWidth(), pSize->GetHeight());
    }
 
public:
    int GetWidth(){return m_Width;}
    int GetHeight(){return m_Height;}
    int GetDataWidth(){return m_DataWidth;}
    UINT GetDataSize(){return (UINT)GetDataWidth()*GetHeight();}
 
public:
    static int ChangeDataWidth(int width){return (width+ 3)/4*4;}
    void SetSize(int width, int height)
    {
        m_Width= width;
        m_Height= height;
        m_DataWidth= ChangeDataWidth(width);//(width+ 3)/4*4 ;
    }
};
 
 
// ÁÖ¼Ò, width, height ¸¸À» °¡Áö°í ´Ù¾çÇѠ󸮸¦ ÇϱâÀ§ÇÑ ±â´É Å¬·¡½ºÀÌ´Ù. µ¥ÀÌÅ͸¦ ½ÇÁ¦ ¼ÒÀ¯ÇÏÁö ¾Ê´Â´Ù.
// °Ë»ç ¹öÆÛ Æ¯¼º»ó boundary¸¦ ³Ñ´Â µ¥ÀÌÅÍ Á¢±Ùµµ °¡´ÉÇϵµ·Ï ¼³°èµÊ. ¸¶À̳ʽº x, y, ¹× width, height¸¦ ³Ñ¾î¼­´Â x, y Çȼ¿·ÎÀÇ Á¢±ÙÀÌ °¡´ÉÇÏ´Ù.
// ¹°·Ð ¸Þ¸ð¸®¿¡ Á¸ÀçÇÏÁö ¾ÊÀ¸¸é »¸¾î¹ö¸®°ÚÁö.. ¹öÆÛ¿¡¼­ Àß Á¶ÀýÇØ¼­ »ç¿ëÇØ¾ß ÇÑ´Ù.
 
class  AFX_EXT_CLASS  CMosisBuffer
{
protected:
    BYTE * m_pData;
    int m_Width, m_DataWidth;
    int m_Height;
 
public:
    CMosisBuffer()
        :m_pData(NULL)
    {SetSize(0, 0);}
    CMosisBuffer(BYTE* pData_, int w, int h)
        : m_pData(pData_)
    {        SetSize(w, h);    }
    virtual ~CMosisBuffer()
    {    };
 
 
    virtual BOOL SetSize(int w, int h)
    {
        m_Width= w;
        m_Height= h;
        m_DataWidth= CMosisBuffer::ChangeDataWidth(w);//(m_Width+ 3)/4*4;
        return TRUE;
    }
    void ChangeData(BYTE* pd)    { m_pData= pd;    }
    void SetBuffer(BYTE* pData_, int w, int h)
    {
        ChangeData(pData_);
        SetSize(w, h);
    }
    void MemSet(BYTE val);
    void RotateImage();
public:
    BYTE * GetDataAddress(){return m_pData;}
    BYTE* GetDataAddress(int x, int y){return m_pData+ GetDataWidth()*y+ x;};
 
    virtual CRect GetAvailableInspectRect(CRect requestRect)
    {
        CRect rect;
        rect.SetRect(1, 1, GetWidth()- 1, GetHeight()- 1);
        rect.IntersectRect(rect, requestRect);
        return rect;
    }
    CRect IntersectRect(CRect &rect);// RECT¸¦ ¹öÆÛ Å©±â¿¡ ¸Â°Ô Àç ¼³Á¤. Return Value´Â rect°¡ ¹öÆÛ¸¦ ¹þ¾î³µÀ¸¸é false, ¾Æ´Ï¸é true
    int GetSize(){return GetWidth()*GetHeight();}
    int GetDataSize(){return GetDataWidth()*GetHeight();}
    int GetWidth(){ return m_Width;}
    int GetDataWidth(){ return m_DataWidth;}
    int GetHeight(){return m_Height;}
    BYTE GetPixel(int idx){return GetPixel(idx%GetDataWidth(), idx/GetDataWidth());};
    BYTE GetPixel(int x, int y){ return *(m_pData+ x+ y*GetDataWidth());}
    BYTE GetPixel(double fx, int y);
    BYTE GetPixel(int x, double fy);
    void SetPixel(int x, int y, BYTE value){*(GetDataAddress(x, y))= value;}
    BOOL SetValidPixel(int x, int y, BYTE value){if(! IsValidPixel(x, y)) return FALSE; SetPixel(x, y, value); return TRUE;}
 
    int GetDiff32(int x, int y, double xPitch);
    int    GetDiff23(int x, int y, double yPitch);
 
    int GetXDiff22(int x, int y, double xPitch);
    int GetYDiff22(int x, int y, double yPitch);
 
    int GetVar(int x, int y, int min);
 
    float GetMeanBright();
    void AdjustBright(CMosisBuffer &buffer);
    void FlipUpDown();
    BOOL IsValidBuffer();
    virtual BOOL IsValidPixel(int x, int y)
    {
        return x >= 0 && y >= 0 && x < m_Width && y < m_Height;
    }
 
    static BOOL CopyBtoA(CMosisBuffer &aBuffer, int x, int y, CMosisBuffer &bBuffer, CRect &rectFrom);
    static int ChangeDataWidth(int width){return (width+ 3)/4*4;}
 
    BOOL Contains(CRect &rect)
    {
        if(rect.left < 0)    return FALSE;
        if(rect.top < 0)    return FALSE;
        if(rect.right > GetWidth())        return FALSE;
        if(rect.bottom > GetHeight())    return FALSE;
 
        return TRUE;
    }
};
 
 
// ÁÖ¼Ò, width, height ¸¸À» °¡Áö°í ´Ù¾çÇѠ󸮸¦ ÇϱâÀ§ÇÑ ±â´É Å¬·¡½ºÀÌ´Ù. µ¥ÀÌÅ͸¦ ½ÇÁ¦ ¼ÒÀ¯ÇÏÁö ¾Ê´Â´Ù.
// ¿ø·¡ ÁÖ¼Ò ¸¦ ¹ö¸®°í x, y¸¸Å­ ¹öÆÛ¸¦ shiftÇØ¼­ »ç¿ëÇÒ ¼ö ÀÖ°Ô ÇØÁØ´Ù.
// ¿ø·¡ ÁּҠü°è°¡ ÇØ´ç ¹öÆÛ ¿Í shift x, y º¸´Ù´Â Å©´Ù´Â °¡Á¤ÇÏ¿¡ »ç¿ë°¡´É.
class  AFX_EXT_CLASS  CShiftBuffer : public CMosisBuffer
{
    int x, y;// x¿Í y´Â pitch ¸¸Å­ À̵¿ÇÑ °ÅÁö..
public:
    CShiftBuffer(CMosisBuffer& iBuffer, int x_, int y_)
        : CMosisBuffer(iBuffer.GetDataAddress(), iBuffer.GetWidth(), iBuffer.GetHeight()), x(x_), y(y_)
    {
        m_pData = GetDataAddress(x, y);
 
        CRect    rect(0, 0, GetWidth(), GetHeight());
        CRect    rectShift = rect;
        rectShift.OffsetRect(x, y);
        
        rect.IntersectRect(rectShift, rect);
    }
    virtual CRect GetAvailableInspectRect(CRect requestRect)
    {
        CRect rect;
        rect.SetRect(1, 1, GetWidth()- x- 1, GetHeight()- y- 1);
        rect.IntersectRect(rect, requestRect);
        return rect;
    }
    virtual BOOL IsValidPixel(int xx, int yy)
    {
        xx= xx- x;
        yy= yy- y;
        return CMosisBuffer::IsValidPixel(xx, yy);
    }
 
};
 
// 2008-08-28, miniont, begin
// ÁÖ¼Ò, width, height ¸¸À» °¡Áö°í ´Ù¾çÇѠ󸮸¦ ÇϱâÀ§ÇÑ ±â´É Å¬·¡½ºÀÌ´Ù. µ¥ÀÌÅ͸¦ ½ÇÁ¦ ¼ÒÀ¯ÇÏÁö ¾Ê´Â´Ù.
// ¿ø·¡ ÁÖ¼Ò, width, height ¸¦ ¹ö¸®°í rectROI Å©±âÀÇ ¹öÆÛÀΰ͠ó·³ µ¿ÀÛÇϰԠÇÑ´Ù.
// Å« ¹öÆÛ¸¦ ¸¶Ä¡ ÀÛÀº ¹öÆÛÀξ砵¿ÀÛÇϰԠÇϴ ¹öÆÛ.
class  AFX_EXT_CLASS  CCropBuffer : public CMosisBuffer
{
    int x, y;// x¿Í y´Â pitch ¸¸Å­ À̵¿ÇÑ °ÅÁö..
public:
    CCropBuffer() : CMosisBuffer(NULL, 0, 0){};
    CCropBuffer(CMosisBuffer& iBuffer, CRect &rectROI)
        : CMosisBuffer(iBuffer.GetDataAddress(rectROI.left, rectROI.top), rectROI.Width(), rectROI.Height()), x(rectROI.left), y(rectROI.top)
    {
        CRect    rectImage(0, 0, iBuffer.GetWidth(), iBuffer.GetHeight());
 
        CRect    rectBoundaryChecked;
        rectBoundaryChecked.IntersectRect(rectROI, rectImage);
 
        m_Width = rectBoundaryChecked.Width();        
        m_Height = rectBoundaryChecked.Height();    
        m_DataWidth = iBuffer.GetDataWidth();
        x = rectROI.left;
        y = rectROI.top;
    }
    void DoCrop(CMosisBuffer& iBuffer, CRect &rectROI)
    {
        SetBuffer(iBuffer.GetDataAddress(rectROI.left, rectROI.top), rectROI.Width(), rectROI.Height());
        x= rectROI.left;
        y= rectROI.top;
        CRect    rectImage(0, 0, iBuffer.GetWidth(), iBuffer.GetHeight());
        CRect    rectBoundaryChecked;
        rectBoundaryChecked.IntersectRect(rectROI, rectImage);
        m_Width = rectBoundaryChecked.Width();        
        m_Height = rectBoundaryChecked.Height();    
        m_DataWidth = iBuffer.GetDataWidth();
    }
    int GetX(){return x;}
    int GetY(){return y;}
    virtual BOOL IsValidPixel(int xx, int yy)
    {
        xx= xx- x;
        yy= yy- y;
        return CMosisBuffer::IsValidPixel(xx, yy);
    }
};
 
// ÁÖ¼Ò, width, height ¸¸À» °¡Áö°í ´Ù¾çÇѠ󸮸¦ ÇϱâÀ§ÇÑ ±â´É Å¬·¡½ºÀÌ´Ù. µ¥ÀÌÅ͸¦ ½ÇÁ¦ ¼ÒÀ¯ÇÏÁö ¾Ê´Â´Ù.
// ´Ù¸¥ ¹öÆÛ¿¡¼­ µ¥ÀÌÅ͸¦ °¡Á®¿Í¼­ º» ¹öÆÛ¿¡ Ä«ÇÇÇÑ´Ù.
class  AFX_EXT_CLASS CCopyBuffer : public CMosisBuffer
{
public:
    CCopyBuffer(CMosisBuffer& buffer)
        : CMosisBuffer(buffer.GetDataAddress(), buffer.GetWidth(), buffer.GetHeight())
    {
        m_DataWidth= buffer.GetDataWidth();
    }
    CCopyBuffer(unsigned char *pData_, int width, int height)
        : CMosisBuffer(pData_, width, height)
    {
    }
    CCopyBuffer(int width, int height)
        : CMosisBuffer(NULL, width, height)
    {
    }
    CCopyBuffer()
        : CMosisBuffer(NULL, 0, 0)
    {
    }
 
public:
    BOOL FillBufferCenter(CMosisBuffer &buffer, double xx, double yy)
    {
        return FillBuffer(buffer, xx- GetWidth()/2, yy- GetHeight()/2);
    }
    BOOL FillBuffer(CMosisBuffer &buffer, double xx, double yy);
    BOOL FillBufferCenter(CMosisBuffer& buffer, int x, int y)
    {
        return FillBuffer(buffer, x- GetWidth()/2, y- GetHeight()/2);
    }
    BOOL FillBuffer(CMosisBuffer& buffer, int x, int y);
};
 
 
// ÁÖ¼Ò, width, height ¸¸À» °¡Áö°í ´Ù¾çÇѠ󸮸¦ ÇϱâÀ§ÇÑ ±â´É Å¬·¡½ºÀÌ´Ù. µ¥ÀÌÅ͸¦ ½ÇÁ¦ ¼ÒÀ¯ÇÏÁö ¾Ê´Â´Ù.
// ÆÄÀÏ¿¡¼­ µ¥ÀÌÅ͸¦ °¡Á®¿Í¼­ º» ¹öÆÛ¿¡ Ä«ÇÇÇÑ´Ù.
class  AFX_EXT_CLASS  CFileBuffer : public CMosisBuffer
{
public:
    CFileBuffer(CMosisBuffer &buffer)
        :CMosisBuffer(buffer.GetDataAddress(), buffer.GetWidth(), buffer.GetHeight())
    {
        m_DataWidth= buffer.GetDataWidth();
    }
    CFileBuffer(int width, int height)
        : CMosisBuffer(NULL, width, height)
    {
    }
 
    CFileBuffer(unsigned char *pData_, int width, int height)
        : CMosisBuffer(pData_, width, height)
    {
    }
 
    // miniont, 2008-8-28, end
public:
    void FillBuffer(CFile &file, int x, int y, int oWidth, int oHeight);
    void FillBufferReverse(CFile &file, int x, int y, int oWidth, int oHeight);        // miniont, 2008-09-10
    void FillBufferFromTwoFile(CFile &file1, CFile &file2, int x, int y, int FirstHeight, int SecondHeight, int oWidth, int oHeight);        // miniont, 2008-09-29
    void SaveBufferToTwoFile(CFile &file1, CFile &file2, int x, int y, int FirstHeight, int SecondHeight, int oWidth, int oHeight);        // miniont, 2008-11-24
 
    const int GetContentWidth(CFile &file);                                                            // miniont, 2008-09-04
    const int GetContentHeight(CFile &file);
    
    static BITMAPINFOHEADER GetBitmapInfoHeader(CFile &file);
    // miniont, 2008-09-04
 
public:
//     CFile m_File;
//     BITMAPINFOHEADER m_InfoHeader;
//     BOOL ReadBuffer(CMosisBuffer &buffer, int x, int y, int width, int height);
//     BOOL WriteBuffer(CMosisBuffer &buffer, int x, int y, int width, int height);
};
 
 
// À¯ÀÏÇϰԠÀÚ½ÅÀÇ µ¥ÀÌÅ͸¦ ¸Þ¸ð¸®¿¡ ¸¸µé¾î ³»´Â ±â´ÉÀ» ÇÑ´Ù.
// ´Ù¸¥ ¹öÆÛ Ã³¸® ±â´ÉÀ» Çϱâ À§Çؼ­ º»¹öÆÛ¸¦ copy¹öÆÛ³ª shift¹öÆÛ, file¹öÆÛµî¿¡ »ý¼ºÀڷΠ³Ñ°ÜÁָ頵ȴÙ.
class AFX_EXT_CLASS COwnerBuffer : public CMosisBuffer
{
    int m_DataSpace;
public:
    COwnerBuffer(int ww= 0, int hh= 0);
    virtual ~COwnerBuffer();
    virtual BOOL SetSize(int ww, int hh);
    void ReleaseSpace();
};
 
 
#include <pshpack2.h>
 
struct AFX_EXT_CLASS stImageFileHeader
{
#define DIB_HEADER_MARKER   ((WORD) ('M' << 8) | 'B')
    BITMAPFILEHEADER    fileHeader;
    BITMAPINFOHEADER    infoHeader;
    RGBQUAD                quad[256];
 
    stImageFileHeader()
    {
        fileHeader.bfType = DIB_HEADER_MARKER;  // "BM"
        fileHeader.bfReserved1 = 0;
        fileHeader.bfReserved2 = 0;
        
        infoHeader.biSize = 40;// sizeof(BITMAPINFOHEADER)
        infoHeader.biWidth = 0;
        infoHeader.biHeight = 0;
        infoHeader.biPlanes = 1;
        infoHeader.biBitCount = 8;
        infoHeader.biCompression = 0;
        infoHeader.biSizeImage = 0;
        infoHeader.biXPelsPerMeter = 2923;
        infoHeader.biYPelsPerMeter = 2923;
        infoHeader.biClrUsed = 0;
        infoHeader.biClrImportant = 0;
 
 
        fileHeader.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD)*256;
        fileHeader.bfSize = fileHeader.bfOffBits + infoHeader.biSizeImage;
 
        int i;
        for(i= 0; i< 256; i++)
        {
            quad[i].rgbRed= i;
            quad[i].rgbGreen= i;
            quad[i].rgbBlue= i;
            quad[i].rgbReserved= 0;
        }
    }
 
public:
    BOOL IsValidHeader()    {    return infoHeader.biWidth > 0;    }// IsValid()
    int GetWidth()    {    return infoHeader.biWidth;    }
    int GetHeight()    {    return infoHeader.biHeight;    }
    UINT GetDataOffset(){    return fileHeader.bfOffBits;}
    UINT GetDataSize(){    return infoHeader.biSizeImage;}
 
    void ChangeSize(int width, int height)// void ChangeHeader(int width, int height)
    {
        infoHeader.biWidth = width;
        infoHeader.biHeight = height;
        stBufferSize bufferSize(width, height);
        infoHeader.biSizeImage = bufferSize.GetDataSize();//width*height*1;
 
//        fileHeader.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD)*256;
        fileHeader.bfSize = fileHeader.bfOffBits + infoHeader.biSizeImage;
    }
 
    void ReadFromFile(CString &fileName)
    {
        CFile file;
        file.Open(fileName, CFile::modeCreate | CFile::typeBinary);
        ReadFromFile(file);
        file.Close();
    }
    void ReadFromFile(CFile &file)
    {
        file.Seek(0, SEEK_SET);
        file.Read(&fileHeader, sizeof(BITMAPFILEHEADER));
        file.Read(&infoHeader, sizeof(BITMAPINFOHEADER));
        file.Read(quad, sizeof(RGBQUAD)*256);
        ChangeSize(infoHeader.biWidth, infoHeader.biHeight);
    }
    BITMAPINFO* GetBitmapInfo(){return (BITMAPINFO*) &infoHeader;}
};
#include <poppack.h>
 
 
// ÁÖ¾îÁø À̸§ÀÇ ÆÄÀÏÀ» Áö¿ì°í »õ·Î »ý¼ºÇÑ´Ù.
// »ý¼ºÀڠȣÃâÇÒ¶§ ÁÖÀÇ ÇØ¶ó...¤»¤»¤».
// AttachToFile ÇÔ¼ö°¡ È£ÃâµÉ¶§¸¶´Ù À̹ÌÁö¸¦ Ãß°¡ÇÑ´Ù.
class  AFX_EXT_CLASS CBufferAttach
{
    CString m_FileName;
    stImageFileHeader *m_pImageFileHeader;
    int        m_bFileMade;
public:
    CBufferAttach(CString &name);
    virtual ~CBufferAttach();
public:
    void    AttachToFile(CMosisBuffer &buffer);
protected:
    BOOL    MakeFile();
};
 
 
 
// ÇÁ·¹ÀÓ ´ÜÀ§·Î À̹ÌÁö¸¦ ÀúÀåÇϱâ À§ÇѠŬ·¡½º.
class AFX_EXT_CLASS CFrameSave
{
    int iStartFrame;
    stImageFileHeader *pImageFileHeader;
    CString strDir;
    
public:
    CFrameSave(CString &strDir_, int startFrame, int width= 8192, int height= 1024);
    virtual ~CFrameSave();
    
public:
    void SaveFrame(BYTE *m_pData, int iFrame);
    void SaveFrame(BYTE *m_pData, int iScan, int iFrame, int cell, int bottom);
};
 
 
// ¹öÆÛ¸¦ ¼øÂ÷ÀûÀ¸·Î ÆÄÀÏ¿¡ ÀúÀåÇϱâ À§ÇѠŬ·¡½º.
class AFX_EXT_CLASS  CFrameSave_OneFile
{
    CBufferAttach *pBufferAttach;
    int width, height;
    
    // ÀúÀåÀ» ½ÃÀÛÇÏ·Á°í Çϴ ¹öÆÛ À妽º.
    int    idStartFrame;
    
    // ÀúÀåÇÒ ÇÁ·¹ÀÓ ¼ö ¹× ÀúÀåÇÑ ÇÁ·¹ÀÓ ¼ö.
    int nSaveFrame;
    int iSaveFrame;
    
    
public:
    CFrameSave_OneFile(CString &fileName_, int startFrame, int saveFrame, int width_= 8192, int height_= 1024);
    virtual ~CFrameSave_OneFile();
public:
    void SaveFrame(int iFrame, CMosisBuffer &frameBuffer);
};
 
 
 
class AFX_EXT_CLASS  CDynamicBuffer : public COwnerBuffer
{
    
public:
    void FillBuffer(CMosisBuffer &buffer, CRect &rect);
};
 
 
// width, height ¸¸Å­ÀÇ ¹öÆÛ¸¦ µ¿ÀûÀ¸·Î »ý¼º ÇÑ´Ù.
class  AFX_EXT_CLASS  CImageBuffer : public CMosisBuffer
{
//     BYTE * m_pData;
//     int    m_Width, m_Height;
    int m_DataSpace;
    stImageFileHeader *m_pFileHeader;
 
public:
    CImageBuffer();
    virtual ~CImageBuffer();
public:
    stImageFileHeader* GetFileHeader()    {        return m_pFileHeader;    }
    
public:
//    stBufferSize GetSize(){return stBufferSize(m_Width, m_Height);}
//    int GetWidth(){return m_Width;}
//    int GetHeight(){return m_Height;}
 
    virtual BOOL SetSize(int ww, int hh);
 
    void ReleaseImage();
    BOOL ReadFromFile(CString &fileName);
};
 
 
 
#endif // !defined(AFX_INSPECTIONBUFFER_H__16133B59_E7ED_46D2_9FCE_FF4D0A62B052__INCLUDED_)