📄 edib.h
字号:
/* //////////////////////////////////////////////////////////////////////////// INTEL CORPORATION PROPRIETARY INFORMATION// This software is supplied under the terms of a license agreement or// nondisclosure agreement with Intel Corporation and may not be copied// or disclosed except in accordance with the terms of that agreement.// Copyright(c) 2004-2005 Intel Corporation. All Rights Reserved.//////*/#ifndef __EDIB_H__#define __EDIB_H__#include "edibfileheader.h"#include "edibinfo.h"#include "edibimagedata.h"template<class ByteOutput>class DIBEncoder{public: DIBEncoder() : m_stream(0) {} // use this function to set up all of paramters DIBInfo &Info() { return m_info; } void Attach(ByteOutput &stream) { m_stream = &stream; } void Detach() { m_stream = 0; } void AttachDiagnOutput(BDiagnOutput &diagnOutput) { m_diagnOutputPtr = diagnOutput; m_info.AttachDiagnOutput(diagnOutput); } unsigned int EstimateFileNOfBytes() const { return DIB_FILE_HEADER_N_OF_BYTES + m_info.EstimateNOfBytes() + m_info.EstimateImageDataNOfBytes(); } void WriteFileHeader() { unsigned int prologSize = DIB_FILE_HEADER_N_OF_BYTES + m_info.EstimateNOfBytes(); unsigned int fileSize = prologSize + m_info.EstimateImageDataNOfBytes(); WriteDIBFileHeader(Stream(), prologSize, fileSize); } void WriteInfo( bool checkPelsPerMeterConformance = true, bool checkOriginConformance = true, bool checkPaletteConformance = true) { m_info.Write(Stream(), checkPelsPerMeterConformance, checkOriginConformance, checkPaletteConformance); } void WriteImageData(const ImageCoreC<Ipp32s,1> *channel) { WriteDIBImageData(Stream(), m_info, channel); }protected: ByteOutput *m_stream; BDiagnOutputPtr m_diagnOutputPtr; EDIBInfo m_info; ByteOutput &Stream() { return *m_stream; }};#endif // __EDIB_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -