下载资源后端资源详情
MyPhotoShop.rar
大小:56.64MB
价格:10积分
下载量:0
评分:
5.0
上传者:不科学的狼
更新日期:2025-09-22

MFC制作简易PhotoShop(亮度、饱和度、马赛克调节、两款滤镜、涂鸦、不规则选区以及操作的撤回与重做)

资源文件列表(大概)

文件名
大小
MyPhotoShop\.vs\MyPhotoShop\v15\.suo
7.52KB
MyPhotoShop\.vs\MyPhotoShop\v15\Browse.VC.db
18.2MB
MyPhotoShop\.vs\MyPhotoShop\v15\ipch\AutoPCH\2d91bce048969fc5\TESTVIEW.ipch
3.17MB
MyPhotoShop\.vs\MyPhotoShop\v15\ipch\e896b25802922c2e.ipch
19.44MB
MyPhotoShop\Debug\MyPhotoShop.exe
100.27KB
MyPhotoShop\Debug\MyPhotoShop.ilk
329.42KB
MyPhotoShop\Debug\MyPhotoShop.pdb
448.63KB
MyPhotoShop\icon\15A亮度+.ico
907B
MyPhotoShop\icon\B0548AC28586D69C69D00A067134D73E.ico
32.2KB
MyPhotoShop\icon\masaike.ico
667B
MyPhotoShop\icon\saturation-饱和度 [128x128].ico
1.94KB
MyPhotoShop\icon\撤销.ico
945B
MyPhotoShop\icon\重做 .ico
1.16KB
MyPhotoShop\MyPhotoShop\Debug\MyPhotoShop.log
478B
MyPhotoShop\MyPhotoShop\Debug\MyPhotoShop.obj
46.95KB
MyPhotoShop\MyPhotoShop\Debug\MyPhotoShop.pch
12.8MB
MyPhotoShop\MyPhotoShop\Debug\MyPhotoShop.res
38.85KB
MyPhotoShop\MyPhotoShop\Debug\MyPhotoShop.tlog\CL.command.1.tlog
446B
MyPhotoShop\MyPhotoShop\Debug\MyPhotoShop.tlog\CL.read.1.tlog
4.35KB
MyPhotoShop\MyPhotoShop\Debug\MyPhotoShop.tlog\CL.write.1.tlog
250B
MyPhotoShop\MyPhotoShop\Debug\MyPhotoShop.tlog\link.command.1.tlog
563B
MyPhotoShop\MyPhotoShop\Debug\MyPhotoShop.tlog\link.read.1.tlog
716B
MyPhotoShop\MyPhotoShop\Debug\MyPhotoShop.tlog\link.write.1.tlog
208B
MyPhotoShop\MyPhotoShop\Debug\MyPhotoShop.tlog\MyPhotoShop.lastbuildstate
281B
MyPhotoShop\MyPhotoShop\Debug\MyPhotoShop.tlog\rc.command.1.tlog
232B
MyPhotoShop\MyPhotoShop\Debug\MyPhotoShop.tlog\rc.read.1.tlog
624B
MyPhotoShop\MyPhotoShop\Debug\MyPhotoShop.tlog\rc.write.1.tlog
165B
MyPhotoShop\MyPhotoShop\Debug\MyPhotoShopDlg.obj
163.2KB
MyPhotoShop\MyPhotoShop\Debug\myphotoshopdlg.obj.enc
162.78KB
MyPhotoShop\MyPhotoShop\Debug\pch.obj
280.66KB
MyPhotoShop\MyPhotoShop\Debug\vc141.idb
31.06KB
MyPhotoShop\MyPhotoShop\Debug\vc141.pdb
1.28MB
MyPhotoShop\MyPhotoShop\framework.h
746B
MyPhotoShop\MyPhotoShop\MyPhotoShop.aps
48.85KB
MyPhotoShop\MyPhotoShop\MyPhotoShop.cpp
1.56KB
MyPhotoShop\MyPhotoShop\MyPhotoShop.h
386B
MyPhotoShop\MyPhotoShop\MyPhotoShop.rc
3.02KB
MyPhotoShop\MyPhotoShop\MyPhotoShop.vcxproj
1.55KB
MyPhotoShop\MyPhotoShop\MyPhotoShop.vcxproj.filters
809B
MyPhotoShop\MyPhotoShop\MyPhotoShop.vcxproj.user
195B
MyPhotoShop\MyPhotoShop\MyPhotoShopDlg.cpp
8.55KB
MyPhotoShop\MyPhotoShop\MyPhotoShopDlg.h
2.55KB
MyPhotoShop\MyPhotoShop\pch.cpp
158B
MyPhotoShop\MyPhotoShop\pch.h
402B
MyPhotoShop\MyPhotoShop\res\icon1.ico
7.13KB
MyPhotoShop\MyPhotoShop\res\icon2.ico
7.15KB
MyPhotoShop\MyPhotoShop\res\MyPhotoShop.ico
52.95KB
MyPhotoShop\MyPhotoShop\res\MyPhotoShop.rc2
229B
MyPhotoShop\MyPhotoShop\resource.h
731B
MyPhotoShop\MyPhotoShop\targetver.h
252B
MyPhotoShop\MyPhotoShop.sln
500B
MyPhotoShop\.vs\MyPhotoShop\v15\ipch\AutoPCH\2d91bce048969fc5
-
MyPhotoShop\.vs\MyPhotoShop\v15\ipch\AutoPCH
-
MyPhotoShop\.vs\MyPhotoShop\v15\ipch
-
MyPhotoShop\.vs\MyPhotoShop\v15
-
MyPhotoShop\MyPhotoShop\Debug\MyPhotoShop.tlog
-
MyPhotoShop\.vs\MyPhotoShop
-
MyPhotoShop\MyPhotoShop\Debug
-
MyPhotoShop\MyPhotoShop\res
-
MyPhotoShop\.vs
-
MyPhotoShop\Debug
-
MyPhotoShop\icon
-
MyPhotoShop\MyPhotoShop
-
MyPhotoShop
-

资源内容介绍

电信专业大一生程序设计实践大作业,无需进行OpenCV的环境配置,直接使用MFC基于对话框的编程制作简易PhotoShop。内涵亮度、饱和度、马赛克调节、两款滤镜、涂鸦、不规则选区以及操作的撤回与重做等功能。上传仅供有同样需求的朋友交流学习,本人能力有限,希望多多包涵!
// MyPhotoShopDlg.cpp: 实现文件//#include "pch.h"#include "framework.h"#include "MyPhotoShop.h"#include "MyPhotoShopDlg.h"#include "afxdialogex.h"#ifdef _DEBUG#define new DEBUG_NEW#endif// 用于应用程序“关于”菜单项的 CAboutDlg 对话框CPoint CMyPhotoShopDlg::mainPic2Pic(CPoint point){ CRect mainPicRect; GetDlgItem(MainPic)->GetWindowRect(&mainPicRect); ScreenToClient(&mainPicRect); CRect picRect; picRect = presentOverlay._rect; CPoint newpoint; newpoint.x = point.x - mainPicRect.left + picRect.left; newpoint.y = point.y - mainPicRect.top + picRect.top; return newpoint;}double maxOf(double a, double b){ return a > b ? a : b;}float maxOf(float r, float g, float b){ if (r > g) { return r > b ? r : b; } else { return g > b ? g : b; }}float minOf(float r, float g, float b){ if (r < g xss=removed xss=removed xss=removed xss=removed xss=removed xss=removed xss=removed xss=removed xss=removed xss=removed> CasualDistrict){ CPoint i[2] = {100,100}; char flag = 0; for (const CPoint CPoint : CasualDistrict) { if (y == CPoint.y) { i[flag] = CPoint; flag++; } if (flag == 2)break; } int startX; int endX; if (i[0].x < i xss=removed xss=removed xss=removed xss=removed xss=removed>= 0) { for (int x = startX; x < endX xss=removed xss=removed xss=removed> 255) return 255; else return (BYTE)a;}CPoint CMyPhotoShopDlg::ConvertMousePosToControl(CPoint mousePos){ CRect controlRect; GetDlgItem(MainPic)->GetWindowRect(&controlRect); // 获取MainPic控件的矩形区域 // 将控件矩形区域转换为相对于屏幕的坐标 ScreenToClient(&controlRect); // 计算鼠标位置相对于控件左上角的偏移量 CPoint offset = mousePos - controlRect.TopLeft(); return offset;}//保存picture control控件的图片,参数ID是picture control控件ID号void CMyPhotoShopDlg::OnPictureSave(UINT ID){ CWnd* bmpShow = GetDlgItem(ID); CDC *pdc = bmpShow->GetDC(); CImage imag; CRect rect; GetClientRect(▭); //获取画布大小 bmpShow->GetWindowRect(▭); imag.Create(rect.Width(), rect.Height(), 32); ::BitBlt(imag.GetDC(), 0, 0, rect.Width(), rect.Height(), pdc->m_hDC, 0, 0, SRCCOPY); TCHAR szFilter[] = _T("jpg file&#40;*.jpg&#41;|*.jpg|bmp file&#40;*.bmp&#41;|*.bmp|所有文件(*.*)|*.*||"); //文件格式过滤 // 构造保存文件对话框 CFileDialog fileDlg(FALSE, _T("jpg"), _T("*.jpg"), OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, szFilter, this); fileDlg.m_ofn.lpstrTitle = _T(""); //保存图片对话窗口标题名 CString picturePath; if (IDOK == fileDlg.DoModal()) //按下确认键 { picturePath = fileDlg.GetPathName(); //文件路径 } HRESULT hResult = imag.Save(picturePath); //保存图片 ReleaseDC(pdc); imag.ReleaseDC();}//RGB与HSV互转HSV RGBtoHSV(RGB rgb){ float R = (float)rgb.R / 255; float G = (float)rgb.G / 255; float B = (float)rgb.B / 255; float Cmax = maxOf(R, G, B); float Cmin = minOf(R, G, B); float delta = Cmax - Cmin; float H = 0, S = 0, V = 0; if (delta != 0) { if (Cmax == R) H = 60 * ((G - B) / delta); else if (Cmax == G) H = 60 * ((B - R) / delta + 2); else if (Cmax == B) H = 60 * ((R - G) / delta + 4); if (H < 0 xss=removed xss=removed xss=removed xss=removed xss=removed xss=removed xss=removed xss=removed> 1)S = 1; float V = hsv.V; float C = V * S; float X = C * (1 - std::abs(fmod(H / 60, 2) - 1)); float m = V - C; float R, G, B; if (H >= 0 && H < 60 xss=removed xss=removed xss=removed>= 60 && H < 120 xss=removed xss=removed xss=removed>= 120 && H < 180 xss=removed xss=removed xss=removed>= 180 && H < 240 xss=removed xss=removed xss=removed>= 240 && H < 300 xss=removed xss=removed xss=removed>= 300 && H < 360 xss=removed xss=removed xss=removed xss=removed xss=removed xss=removed xss=removed xss=removed xss=removed xss=removed xss=removed xss=removed xss=removed xss=removed>LoadIcon(IDR_MAINFRAME); strFileName = _T(""); strFilePath = _T(""); value_brightness = 0; value_intensity = 0; value_mosaic = 0; districtTop = 0; districtBottom = 0;}void CMyPhotoShopDlg::DoDataExchange(CDataExchange* pDX){ CDialogEx::DoDataExchange(pDX); DDX_Control(pDX, MainPic, m_picture); DDX_Control(pDX, Brightness_slider, BrightnessCtrl); DDX_Control(pDX, Intensity_slider, IntensityCtrl); DDX_Control(pDX, Mosaic_slider, MosaicCtrl); DDX_Control(pDX, repealBtn, repealBtnIco); DDX_Control(pDX, reworkBtn, reworkBtnIco); DDX_Control(pDX, BlackPen, BlackP); DDX_Control(pDX, RedPen, RedP); DDX_Control(pDX, GreenPen, GreenP); DDX_Control(pDX, BluePen, BlueP); DDX_Control(pDX, DrawBtn, DrawBtnCtrl); DDX_Control(pDX, Point1_x, Point1_x_show); DDX_Control(pDX, Point1_y, Point1_y_show); DDX_Control(pDX, Point2_x, Point2_x_show); DDX_Control(pDX, Point2_y, Point2_y_show); DDX_Control(pDX, HuaiJiu, huaiJiuCtrl); DDX_Control(pDX, RouHua, rouHuaCtrl);}BEGIN_MESSAGE_MAP(CMyPhotoShopDlg, CDialogEx) ON_WM_SYSCOMMAND() ON_WM_PAINT() ON_WM_QUERYDRAGICON() ON_BN_CLICKED(IDC_InputPic, &CMyPhotoShopDlg::OnBnClickedInputpic) ON_NOTIFY(NM_CUSTOMDRAW, Brightness_slider, &CMyPhotoShopDlg::OnNMCustomdrawslider) ON_NOTIFY(NM_CUSTOMDRAW, Intensity_slider, &CMyPhotoShopDlg::OnNMCustomdrawslider2) ON_BN_CLICKED(chooseOverlay, &CMyPhotoShopDlg::OnBnClickedchooseoverlay) ON_NOTIFY(NM_CUSTOMDRAW, Mosaic_slider, &CMyPhotoShopDlg::OnNMCustomdrawslider3) ON_WM_LBUTTONDOWN() ON_BN_CLICKED(DrawSwitch, &CMyPhotoShopDlg::OnBnClickedBlackPen) ON_WM_LBUTTONUP() ON_WM_MOUSEMOVE() ON_BN_CLICKED(repealBtn, &CMyPhotoShopDlg::OnBnClickedrepealbtn) ON_NOTIFY(NM_RELEASEDCAPTURE, Brightness_slider, &CMyPhotoShopDlg::OnNMReleasedBrightness) ON_NOTIFY(NM_RELEASEDCAPTURE, Intensity_slider, &CMyPhotoShopDlg::OnNMReleasedIntensity) ON_NOTIFY(NM_RELEASEDCAPTURE, Mosaic_slider, &CM

用户评论 (0)

发表评论

captcha

相关资源

百度ck登录器(需要自取)

免费分享给大家 有需要自取

6.87MB44积分

山东大学软件学院软件工程专业面向对象技术PPT+练习题(包括往年题)

包括专项练习题+山东大学期末往年题本人就是使用这一套练习题,在2024年度面向对象技术期末考试中取得96的成绩只要大家使用这套练习题和往年题,仔仔细细做一遍期末考试成绩不会差里面的大部分题目都有参考答案。同时我也对部分的试题写了CSDN解析,如果有需要的话可以去我的个人主页进行查看在做题目之前我强烈建议大家看一遍我个人主页中对于面向对象技术基础知识的四篇讲解文章。对于设计模式我也将在后续更新祝学弟学妹们都能取得好成绩呀~~

13.53MB22积分

微信小程序上华为云温湿度控制LED

与arduino上华为云配合使用

174.13KB22积分

广东工业大学通信原理实验报告

实验一 PCM编译码实验一、实验目的1、 掌握脉冲编码调制与解调的原理。2、 掌握脉冲编码调制与解调系统的动态范围和频率特性的定义及测量方法。3、 了解脉冲编码调制信号的频谱特性。二、实验内容任务一 PCM 编码规则验证概述:该任务是通过改变输入信号幅度或编码时钟,对比观测 A 律 PCM 编译码和μ律任务二 PCM 编码时序观测概述:该任务是从时序角度观测 PCM 编码输出波形。三、实验原理1、 实验原理框图 图1 M01号模块的PCM编译码实验2、 实验框图说明图1中描述的是采用软件方式实现PCM编译码,并展示中间变换的过程。PCM编码过程是将音乐信号或正弦波信号先经抽样、量化,之后再进行编码,输出PCM码组,PCM译码过程是PCM编码逆向的过程,不再赘述。3、 PCM 编码基本原理模拟信号进行抽样后,其抽样值还是随信号幅度连续变化的,当这些连续变化的抽样值通过有噪声的信道传输时,接收端就不能对所发送的抽样准确地估值。如果发送端用预先规定的有限个电平来表示抽样值,且电平间隔比干扰噪声大,则接收端将有可能对所发送的抽样准确地估值,从而有可能消除随

25.17MB18积分