91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

對于一個mfc位圖運用vc++實現(xiàn)彩色圖與灰度圖的轉(zhuǎn)換

資源截圖

代碼片段和文件信息

//Download?by?http://www.NewXing.com
//??dibapi.cpp
//
//??Source?file?for?Device-Independent?Bitmap?(DIB)?API.??Provides
//??the?following?functions:
//
//??PaintDIB()??????????-?Painting?routine?for?a?DIB
//??CreateDIBPalette()??-?Creates?a?palette?from?a?DIB
//??FindDIBBits()???????-?Returns?a?pointer?to?the?DIB?bits
//??DIBWidth()??????????-?Gets?the?width?of?the?DIB
//??DIBHeight()?????????-?Gets?the?height?of?the?DIB
//??PaletteSize()???????-?Gets?the?size?required?to?store?the?DIB‘s?palette
//??DIBNumColors()??????-?Calculates?the?number?of?colors
//????????????????????????in?the?DIB‘s?color?table
//??CopyHandle()????????-?Makes?a?copy?of?the?given?global?memory?block
//
//?This?is?a?part?of?the?Microsoft?Foundation?Classes?C++?library.
//?Copyright?(C)?1992-1997?Microsoft?Corporation
//?All?rights?reserved.
//
//?This?source?code?is?only?intended?as?a?supplement?to?the
//?Microsoft?Foundation?Classes?Reference?and?related
//?electronic?documentation?provided?with?the?library.
//?See?these?sources?for?detailed?information?regarding?the
//?Microsoft?Foundation?Classes?product.

#include?“stdafx.h“
#include?“dibapi.h“
#include?
#include?
#include?

#define?DIB_HEADER_MARKER???((WORD)?(‘M‘?<
#ifdef?_MAC
#define?SWAPWORD(x)?MAKEWORD(HIBYTE(x)?LOBYTE(x))
#define?SWAPLONG(x)?MAKELONG(SWAPWORD(HIWORD(x))?SWAPWORD(LOWORD(x)))
void?ByteSwapHeader(BITMAPFILEHEADER*?bmiHeader);
void?ByteSwapInfo(LPSTR?lpHeader?BOOL?fWin30Header);
#endif

/*************************************************************************
?*
?*?PaintDIB()
?*
?*?Parameters:
?*
?*?HDC?hDC??????????-?DC?to?do?output?to
?*
?*?LPRECT?lpDCRect??-?rectangle?on?DC?to?do?output?to
?*
?*?HDIB?hDIB????????-?handle?to?global?memory?with?a?DIB?spec
?*????????????????????in?it?followed?by?the?DIB?bits
?*
?*?LPRECT?lpDIBRect?-?rectangle?of?DIB?to?output?into?lpDCRect
?*
?*?CPalette*?pPal???-?pointer?to?CPalette?containing?DIB‘s?palette
?*
?*?Return?Value:
?*
?*?BOOL?????????????-?TRUE?if?DIB?was?drawn?FALSE?otherwise
?*
?*?Description:
?*???Painting?routine?for?a?DIB.??Calls?StretchDIBits()?or
?*???SetDIBitsToDevice()?to?paint?the?DIB.??The?DIB?is
?*???output?to?the?specified?DC?at?the?coordinates?given
?*???in?lpDCRect.??The?area?of?the?DIB?to?be?output?is
?*???given?by?lpDIBRect.
?*
?************************************************************************/

BOOL?WINAPI?PaintDIB(HDC?????hDC
LPRECT??lpDCRect
HDIB????hDIB
LPRECT??lpDIBRect
CPalette*?pPal)
{
LPSTR????lpDIBHdr;????????????//?Pointer?to?BITMAPINFOHEADER
LPSTR????lpDIBBits;???????????//?Pointer?to?DIB?bits
BOOL?????bSuccess=FALSE;??????//?Success/fail?flag
HPALETTE?hPal=NULL;???????????//?Our?DIB‘s?palette
HPALETTE?hOldPal=NULL;????????//?Previous?palette

/*?Check?for?valid?DIB?handle?*/
if?(hDIB?==?NULL)
return?FALSE;

/*?Lock?down?the?DIB?and?get?a?pointer?to?the?begin

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

????.......?????46344??2004-06-30?00:45??www.NewXing.com\源代碼\MyDIP.aps

????.......??????1078??2004-05-20?14:25??www.NewXing.com\源代碼\res\Toolbar.bmp

????.......?????66614??2004-06-30?00:47??www.NewXing.com\測試圖片\彩色lena圖像.BMP

????.......?????66614??2004-06-30?00:47??www.NewXing.com\測試圖片\轉(zhuǎn)換為灰度圖像.BMP

????.......??????2615??2004-06-30?00:43??www.NewXing.com\源代碼\MyDIP.clw

?????文件??????23820??2011-10-06?00:13??www.NewXing.com\源代碼\dibapi.cpp

?????文件???????2544??2011-10-06?00:13??www.NewXing.com\源代碼\MainFrm.cpp

?????文件???????3195??2011-10-06?00:13??www.NewXing.com\源代碼\mydib.cpp

?????文件???????4196??2011-10-06?00:13??www.NewXing.com\源代碼\MyDIP.cpp

?????文件???????4045??2011-10-06?00:13??www.NewXing.com\源代碼\MyDIPDoc.cpp

?????文件???????7080??2011-10-06?00:13??www.NewXing.com\源代碼\MyDIPView.cpp

?????文件????????245??2011-10-06?00:13??www.NewXing.com\源代碼\StdAfx.cpp

????.......??????4785??2004-06-30?00:47??www.NewXing.com\源代碼\MyDIP.dsp

????.......???????533??2004-05-20?14:25??www.NewXing.com\源代碼\MyDIP.dsw

????.......?????36864??2004-06-30?00:48??www.NewXing.com\源代碼\Release\MyDIP.exe

?????文件???????1914??2011-10-06?00:13??www.NewXing.com\源代碼\dibapi.h

?????文件???????1619??2011-10-06?00:13??www.NewXing.com\源代碼\MainFrm.h

?????文件????????110??2011-10-06?00:13??www.NewXing.com\源代碼\mydib.h

?????文件???????1383??2011-10-06?00:13??www.NewXing.com\源代碼\MyDIP.h

?????文件???????1868??2011-10-06?00:13??www.NewXing.com\源代碼\MyDIPDoc.h

?????文件???????1890??2011-10-06?00:13??www.NewXing.com\源代碼\MyDIPView.h

?????文件????????912??2011-10-06?00:13??www.NewXing.com\源代碼\Resource.h

?????文件???????1078??2011-10-06?00:13??www.NewXing.com\源代碼\StdAfx.h

????.......??????1078??2004-05-20?14:25??www.NewXing.com\源代碼\res\MyDIP.ico

????.......??????1078??2004-05-20?14:25??www.NewXing.com\源代碼\res\MyDIPDoc.ico

????.......????189440??2009-05-11?14:46??www.NewXing.com\源代碼\MyDIP.ncb

????.......?????54784??2009-05-11?14:46??www.NewXing.com\源代碼\MyDIP.opt

????.......??????1031??2009-05-11?14:46??www.NewXing.com\源代碼\MyDIP.plg

????.......?????12279??2004-06-30?00:45??www.NewXing.com\源代碼\MyDIP.rc

????.......???????397??2004-05-20?14:25??www.NewXing.com\源代碼\res\MyDIP.rc2

............此處省略8個文件信息

評論

共有 條評論