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

  • 大小: 617.76 KB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2024-09-02
  • 語言: 其他
  • 標(biāo)簽: 圖像處理??

資源簡介

在這里面有基本的空間變換,還有其他的各種處理。

資源截圖

代碼片段和文件信息

//?cdib.cpp
//?new?version?for?WIN32
#include?“stdafx.h“
#include?“cdib.h“

#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif

IMPLEMENT_SERIAL(CDib?Cobject?0);

CDib::CDib()
{
m_hFile?=?NULL;
m_hBitmap?=?NULL;
m_hPalette?=?NULL;
m_nBmihAlloc?=?m_nImageAlloc?=?noAlloc;
Empty();
}

CDib::CDib(CSize?size?int?nBitCount)
{
m_hFile?=?NULL;
m_hBitmap?=?NULL;
m_hPalette?=?NULL;
m_nBmihAlloc?=?m_nImageAlloc?=?noAlloc;
Empty();
ComputePaletteSize(nBitCount);
m_lpBMIH?=?(LPBITMAPINFOHEADER)?new?
char[sizeof(BITMAPINFOHEADER)?+?sizeof(RGBQUAD)?*?m_nColorTableEntries];
m_nBmihAlloc?=?crtAlloc;
m_lpBMIH->biSize?=?sizeof(BITMAPINFOHEADER);
m_lpBMIH->biWidth?=?size.cx;
m_lpBMIH->biHeight?=?size.cy;
m_lpBMIH->biPlanes?=?1;
m_lpBMIH->biBitCount?=?nBitCount;
m_lpBMIH->biCompression?=?BI_RGB;
m_lpBMIH->biSizeImage?=?0;
m_lpBMIH->biXPelsPerMeter?=?0;
m_lpBMIH->biYPelsPerMeter?=?0;
m_lpBMIH->biClrUsed?=?m_nColorTableEntries;
m_lpBMIH->biClrImportant?=?m_nColorTableEntries;
ComputeMetrics();
memset(m_lpvColorTable?0?sizeof(RGBQUAD)?*?m_nColorTableEntries);
m_lpImage?=?NULL;??//?no?data?yet
}

CDib::~CDib()
{
Empty();
}

CSize?CDib::GetDimensions()
{
if(m_lpBMIH?==?NULL)?return?CSize(0?0);
return?CSize((int)?m_lpBMIH->biWidth?(int)?m_lpBMIH->biHeight);
}

BOOL?CDib::AttachMapFile(const?char*?strPathname?BOOL?bShare)?//?for?reading
{
//?if?we?open?the?same?file?twice?Windows?treats?it?as?2?separate?files
//?doesn‘t?work?with?rare?BMP?files?where?#?palette?entries?>?biClrUsed
HANDLE?hFile?=?::CreateFile(strPathname?GENERIC_WRITE?|?GENERIC_READ
bShare???FILE_SHARE_READ?:?0
NULL?OPEN_EXISTING?FILE_ATTRIBUTE_NORMAL?NULL);
ASSERT(hFile?!=?INVALID_HANDLE_VALUE);
DWORD?dwFileSize?=?::GetFileSize(hFile?NULL);
HANDLE?hMap?=?::CreateFileMapping(hFile?NULL?PAGE_READWRITE?0?0?NULL);
DWORD?dwErr?=?::GetLastError();

if(hMap?==?NULL)
{
AfxMessageBox(“Empty?bitmap?file“);
return?FALSE;
}

LPVOID?lpvFile?=?::MapViewOfFile(hMap?FILE_MAP_WRITE?0?0?0);?//?map?whole?file
ASSERT(lpvFile?!=?NULL);

if(((LPBITMAPFILEHEADER)?lpvFile)->bfType?!=?0x4d42)
{
AfxMessageBox(“Invalid?bitmap?file“);
DetachMapFile();
return?FALSE;
}

AttachMemory((LPBYTE)?lpvFile?+?sizeof(BITMAPFILEHEADER));
m_lpvFile?=?lpvFile;
m_hFile?=?hFile;
m_hMap?=?hMap;
return?TRUE;
}

BOOL?CDib::CopyToMapFile(const?char*?strPathname)
{
//?copies?DIB?to?a?new?file?releases?prior?pointers
//?if?you?previously?used?CreateSection?the?HBITMAP?will?be?NULL?(and?unusable)
BITMAPFILEHEADER?bmfh;
bmfh.bfType?=?0x4d42;??//?‘BM‘
bmfh.bfSize?=?m_dwSizeImage?+?sizeof(BITMAPINFOHEADER)?+
sizeof(RGBQUAD)?*?m_nColorTableEntries?+?sizeof(BITMAPFILEHEADER);
//?meaning?of?bfSize?open?to?interpretation
bmfh.bfReserved1?=?bmfh.bfReserved2?=?0;
bmfh.bfOffBits?=?sizeof(BITMAPFILEHEADER)?+?sizeof

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件??????16334??2000-12-10?23:12??數(shù)字圖像處理\cdib.cpp

?????文件???????1906??1997-03-24?16:39??數(shù)字圖像處理\cdib.h

?????文件???????3159??2000-12-27?14:25??數(shù)字圖像處理\cDlgMorphClose.cpp

?????文件???????1675??2000-12-27?14:25??數(shù)字圖像處理\cDlgMorphClose.h

?????文件???????3200??2000-12-21?14:41??數(shù)字圖像處理\cDlgMorphDilation.cpp

?????文件???????1708??2000-12-21?14:39??數(shù)字圖像處理\cDlgMorphDilation.h

?????文件???????3187??2000-12-21?13:46??數(shù)字圖像處理\cDlgMorphErosion.cpp

?????文件???????1697??2001-02-13?19:20??數(shù)字圖像處理\cDlgMorphErosion.h

?????文件???????3142??2000-12-21?17:14??數(shù)字圖像處理\cDlgMorphOpen.cpp

?????文件???????1664??2000-12-21?16:47??數(shù)字圖像處理\cDlgMorphOpen.h

?????文件??????71560??2009-02-09?23:25??數(shù)字圖像處理\ch1_1.aps

?????文件??????18105??2009-02-14?13:07??數(shù)字圖像處理\ch1_1.clw

?????文件???????4307??2000-12-11?12:35??數(shù)字圖像處理\ch1_1.cpp

?????文件???????8572??2001-03-25?15:50??數(shù)字圖像處理\ch1_1.dsp

?????文件????????535??2001-01-15?09:33??數(shù)字圖像處理\ch1_1.dsw

?????文件???????1345??2000-12-05?22:52??數(shù)字圖像處理\ch1_1.h

?????文件?????189440??2009-02-14?13:14??數(shù)字圖像處理\ch1_1.ncb

?????文件?????733184??2009-02-14?13:14??數(shù)字圖像處理\ch1_1.opt

?????文件???????5598??2009-02-14?13:08??數(shù)字圖像處理\ch1_1.plg

?????文件??????43280??2009-02-09?23:25??數(shù)字圖像處理\ch1_1.rc

?????文件??????22275??2005-01-04?02:16??數(shù)字圖像處理\ch1_1.vcproj

?????文件???????7742??2001-01-16?14:54??數(shù)字圖像處理\ch1_1Doc.cpp

?????文件???????2065??2001-02-14?10:22??數(shù)字圖像處理\ch1_1Doc.h

?????文件??????95792??2001-02-22?19:08??數(shù)字圖像處理\ch1_1View.cpp

?????文件???????4079??2001-02-22?15:11??數(shù)字圖像處理\ch1_1View.h

?????文件???????1879??2000-12-05?22:52??數(shù)字圖像處理\ChildFrm.cpp

?????文件???????1451??2000-12-05?22:52??數(shù)字圖像處理\ChildFrm.h

?????文件??????65041??2001-01-06?23:01??數(shù)字圖像處理\ColorTable.h

?????文件??????13890??2001-01-11?22:20??數(shù)字圖像處理\detect.cpp

?????文件????????581??2001-01-09?15:04??數(shù)字圖像處理\detect.h

............此處省略102個(gè)文件信息

評(píng)論

共有 條評(píng)論

相關(guān)資源