dibsectn.h

来自「数字滤波函数」· C头文件 代码 · 共 53 行

H
53
字号
//-----------------------------------------------------------------------------
//  (c) 2002 by Basler Vision Technologies
//  Section:  Vision Components
//  Project:  BVC
//  $Header: DibSectn.h, 1, 8/28/02 6:58:03 PM, Nebelung, H.$
//-----------------------------------------------------------------------------
/**
  \file     DIBSECTN.H
 *
  \brief   Interface for the DIBSections functions
 *
 * <type long description here>
 */
//-----------------------------------------------------------------------------


#pragma once


//! Creates a DIBSection based on the criteria passed in as parameters.
HBITMAP DSCreateDIBSection( LONG dwX, LONG dwY, WORD wBits, BOOL Monochrome );

//! Creates a DIBSection based on the contents of a BMP file.
BOOL DSLoadDIBSectionFromBMPFile( LPCTSTR szFileName, HBITMAP *phBitmap, HPALETTE *phPalette );

//! Stores the DIBSection in a BMP file.
BOOL DSStoreDIBSectionInBMPFile( LPCTSTR szFileName, HBITMAP hBitmap );

//! Draws a DIBSection on a target DC.
BOOL DSDrawDIBSectionOnDC( HDC hDC, HBITMAP hBitmap, LPRECT pRect );

//! Creates a palette to be used to display the DIBSection on a palettized display device.
HPALETTE DSCreatePaletteForDIBSection( HBITMAP hBitmap );

//! Allocates and returns a pointer to a BITMAPINFO for the DIBSection.
LPBITMAPINFO DSGetBITMAPINFOForDIBSection( HBITMAP hBitmap );

//! Calculates and returns the size, in bytes, of the color table for the DIB described by the BITMAPINFO.
DWORD DSColorTableSize( LPBITMAPINFO pbmi );

//! Calculates and returns the size, in bytes, of the entire CF_DIB bitmap described by the BITMAPINFO 
//! - including header, color table, and image bits.
DWORD DSTotalBytesSize( LPBITMAPINFO pbmi );

//! Calculates and returns the size, in bytes, of the image bits for the DIB described by the BITMAPINFO.
DWORD DSImageBitsSize( LPBITMAPINFO pbmi );

//! Returns a pointer to the DIBSection's image bits.
LPBYTE DSGetPointerToDIBSectionImageBits( HBITMAP hBitmap );

//! This function will build a palette with a spectrum of colors.  
HPALETTE DSCreateSpectrumPalette( void );

⌨️ 快捷键说明

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