#pragma once

namespace ImgAssist 
{
	std::string CaptureGameWnd(HWND hWnd);
	void CaptureGameWnd(HWND hWnd, std::string strSavePath);
	cv::Mat CaptureWnd(HWND hWnd);
	BOOL OpenImage(std::string strImag, cv::Mat& img);
	BOOL SetImgThreshold(cv::Mat& srcImg, cv::Mat& thresholdImg, long nThresholdVal, long nMaxThresholdVal, int type = 0);
	BOOL GetImgMatchtemplate(HWND hWnd, std::string strTempImg, RECT& rc, double lowestMatchValue = 0.900);
	BOOL GetImgMatchtemplate(std::string strSrcImg, std::string strTempImg, RECT& rc, double lowestMatchValue = 0.900);
	BOOL IsMatchIcon(HWND hWnd, std::string strTempImg, RECT srcRect, RECT& matchRect, double lowestMatchValue = 0.900);
	BOOL CropPicture(HWND hWnd, CRect rc, const char* szSaveName); // 剪裁图片;
	BOOL IsSimilarPicture(const char* szp1, const char* szp2, double lowestMatchValue = 0.99);
	// 获取指定颜色占用矩形长度比例;
	int GetColorOccupiedLength(std::string strImg, int r, int g, int b);
};
