⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dibinfo.h

📁 这是在PCA下的基于IPP库示例代码例子,在网上下了IPP的库之后,设置相关参数就可以编译该代码.
💻 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 __DIBINFO_H__#define __DIBINFO_H__#include "dib.h"#include "fixedarray.h"#include "geometry2d.h"class DIBInfo{public:    DIBInfo()    : m_style (Common)    , m_depth (Depth_8)    , m_origin(BottomLeft)    {}    DIBInfo(const DIBInfo &dibInfo)    : m_style       (dibInfo.m_style)    , m_size        (dibInfo.m_size)    , m_depth       (dibInfo.m_depth)    , m_origin      (dibInfo.m_origin)    , m_pelsPerMeter(dibInfo.m_pelsPerMeter)    , m_palette     (dibInfo.m_palette)    , m_rawExtension(dibInfo.m_rawExtension)    {}    DIBInfo& operator=(const DIBInfo& dibInfo)    {        if(this != &dibInfo)        {            SetStyle        (dibInfo.Style());            SetSize         (dibInfo.Size());            SetDepth        (dibInfo.Depth());            SetOrigin       (dibInfo.Origin());            SetPelsPerMeter (dibInfo.PelsPerMeter());            SetPalette      (dibInfo.Palette(),      dibInfo.Palette()     .Size());            SetRawExtension (dibInfo.RawExtension(), dibInfo.RawExtension().Size());        }        return *this;    }    void SetStyle        (DIBInfoStyle    style)        { m_style        = style;        }    void SetSize         (const RectSize &size)         { m_size         = size;         }    void SetDepth        (DIBDepth        depth)        { m_depth        = depth;        }    void SetOrigin       (DIBOrigin       origin)       { m_origin       = origin;       }    void SetPelsPerMeter (const RectSize &pelsPerMeter) { m_pelsPerMeter = pelsPerMeter; }    void SetPalette      (const DIBRGBValue *palette, unsigned int size)    {        m_palette.ReAlloc(size);        Copy(palette, m_palette, size);    }    void SetPaletteDeFactoStdGray()    {        m_palette.ReAlloc(256);        for(unsigned int i = 0; i < 256; i ++)            m_palette[i] = DIBRGBValue((unsigned char)i);    }    bool IsPaletteDeFactoStdGray() const    {        if(m_palette.Size() != 256)            return false;        for(unsigned int entry = 0; entry <= 255; entry++)        {            DIBRGBValue gray((unsigned char)entry);            if(m_palette[entry] != gray)                return false;        }        return true;    }    void SetRawExtension (const Ipp8u *rawData, unsigned int size)    {        m_rawExtension.ReAlloc(size);        Copy(rawData, m_rawExtension, size);    }    unsigned int EstimateImageDataNOfBytes() const    {        return m_size.Height() * LineStep(m_depth, m_size.Width());    }    DIBInfoStyle                   Style       () const { return m_style;        }    const RectSize                &Size        () const { return m_size;         }    DIBDepth                       Depth       () const { return m_depth;        }    DIBOrigin                      Origin      () const { return m_origin;       }    const RectSize                &PelsPerMeter() const { return m_pelsPerMeter; }    const FixedArray<DIBRGBValue> &Palette     () const { return m_palette;      }    const FixedArray<Ipp8u>       &RawExtension() const { return m_rawExtension; }protected:    DIBInfoStyle            m_style;    RectSize                m_size;    DIBDepth                m_depth;    DIBOrigin               m_origin;    RectSize                m_pelsPerMeter;    FixedArray<DIBRGBValue> m_palette;    FixedArray<Ipp8u>       m_rawExtension;};#endif // __DIBINFO_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -