北京哪个网站最好企业网站管理系统联系我们怎么添加

张小明 2026/1/13 0:49:50
北京哪个网站最好,企业网站管理系统联系我们怎么添加,万网网站模板下载,wordpress主题 ie打不开主页在以往几篇文章里面#xff0c;大家都可以看到各种录制的GIF效果图#xff0c;把gif放在文章开始#xff0c;不仅可以减少很多冗余的解释白话文#xff0c;更可以让读者一览无余看到文章大概要义。以往都是使用“LicEcap”来录制的#xff0c;那么我们是否能自己实现一个这…在以往几篇文章里面大家都可以看到各种录制的GIF效果图把gif放在文章开始不仅可以减少很多冗余的解释白话文更可以让读者一览无余看到文章大概要义。以往都是使用“LicEcap”来录制的那么我们是否能自己实现一个这样的工具呢一方面国庆假期结束练练代码手感另一方面可以根据自己需求扩展需要的功能。01介绍软件UI及操作操作比较简单以下是运行界面选择录制区域绘制需要录制的ROI区域点击开始录制录制结束后停止录制即可.弹出保存路径保存gifimage.png02效果图整个运行作业图test.gif实际录屏的ROI区域效果GIFeee.gif03源码介绍imageprivate void InitializeComponents(){this.Text GIF录制工具;this.Size new Size(400, 200);this.StartPosition FormStartPosition.CenterScreen;// 选择区域按钮Button btnSelectArea new Button();btnSelectArea.Text 选择录制区域;btnSelectArea.Size new Size(120, 30);btnSelectArea.Location new Point(20, 20);btnSelectArea.Click BtnSelectArea_Click;this.Controls.Add(btnSelectArea);// 开始录制按钮Button btnStart new Button();btnStart.Text 开始录制;btnStart.Size new Size(120, 30);btnStart.Location new Point(20, 60);btnStart.Click BtnStart_Click;this.Controls.Add(btnStart);// 停止录制按钮Button btnStop new Button();btnStop.Text 停止录制;btnStop.Size new Size(120, 30);btnStop.Location new Point(20, 100);btnStop.Click BtnStop_Click;this.Controls.Add(btnStop);// 帧率选择Label lblFrameRate new Label();lblFrameRate.Text 帧率:;lblFrameRate.Location new Point(160, 65);lblFrameRate.Size new Size(50, 20);this.Controls.Add(lblFrameRate);NumericUpDown numFrameRate new NumericUpDown();numFrameRate.Value frameRate;numFrameRate.Minimum 1;numFrameRate.Maximum 30;numFrameRate.Location new Point(210, 65);numFrameRate.Size new Size(60, 20);numFrameRate.ValueChanged (s, e) { frameRate (int)numFrameRate.Value; };this.Controls.Add(numFrameRate);// 状态标签Label lblStatus new Label();lblStatus.Text 状态: 就绪;lblStatus.Location new Point(160, 25);lblStatus.Size new Size(200, 20);lblStatus.Name lblStatus;this.Controls.Add(lblStatus);// 录制计时器captureTimer new System.Windows.Forms.Timer();captureTimer.Tick CaptureTimer_Tick;}选择ROI录屏区域private void StartAreaSelection(){this.Hide();Thread.Sleep(500); // 等待窗体隐藏isSelectingArea true;Cursor Cursors.Cross;// 创建全屏透明窗体用于区域选择Form selectionForm new Form();selectionForm.WindowState FormWindowState.Maximized;selectionForm.FormBorderStyle FormBorderStyle.None;selectionForm.BackColor Color.Black;selectionForm.Opacity 0.3;selectionForm.TopMost true;selectionForm.Cursor Cursors.Cross;Rectangle selectedArea Rectangle.Empty;bool isDragging false;Point dragStart Point.Empty;selectionForm.MouseDown (s, e) {if (e.Button MouseButtons.Left){isDragging true;dragStart e.Location;}};selectionForm.MouseMove (s, e) {if (isDragging){int x Math.Min(dragStart.X, e.X);int y Math.Min(dragStart.Y, e.Y);int width Math.Abs(e.X - dragStart.X);int height Math.Abs(e.Y - dragStart.Y);selectedArea new Rectangle(x, y, width, height);selectionForm.Invalidate();}};selectionForm.MouseUp (s, e) {if (e.Button MouseButtons.Left isDragging){isDragging false;if (selectedArea.Width 10 selectedArea.Height 10){recordingArea selectedArea;UpdateStatus($已选择区域: {recordingArea});}selectionForm.Close();}};selectionForm.Paint (s, e) {if (isDragging !selectedArea.IsEmpty){using (Pen pen new Pen(Color.Red, 2)){e.Graphics.DrawRectangle(pen, selectedArea);}string sizeText ${selectedArea.Width} x {selectedArea.Height};using (Font font new Font(Arial, 12))using (Brush brush new SolidBrush(Color.Red)){e.Graphics.DrawString(sizeText, font, brush, selectedArea.X, selectedArea.Y - 20);}}};selectionForm.KeyDown (s, e) {if (e.KeyCode Keys.Escape){selectionForm.Close();}};selectionForm.FormClosed (s, e) {isSelectingArea false;Cursor Cursors.Default;this.Show();this.BringToFront();};selectionForm.ShowDialog();}录制结束保存GIFprivate void SaveGif(){if (frames.Count 0){MessageBox.Show(没有可保存的帧, 提示, MessageBoxButtons.OK, MessageBoxIcon.Information);return;}using (SaveFileDialog saveDialog new SaveFileDialog()){saveDialog.Filter GIF 文件|*.gif;saveDialog.Title 保存GIF文件;saveDialog.DefaultExt gif;if (saveDialog.ShowDialog() DialogResult.OK){try{// 使用GifBitmapEncoder替代方案SaveFramesAsGif(frames, saveDialog.FileName, frameRate);MessageBox.Show($GIF保存成功\n文件: {saveDialog.FileName}\n帧数: {frames.Count}, 成功,MessageBoxButtons.OK, MessageBoxIcon.Information);}catch (Exception ex){MessageBox.Show($保存GIF时出错: {ex.Message}, 错误, MessageBoxButtons.OK, MessageBoxIcon.Error);}}}// 清理资源foreach (var frame in frames){frame.Dispose();}frames.Clear();}private void SaveFramesAsGif(ListBitmap frames, string filePath, int frameRate){using (var collection new MagickImageCollection()){foreach (var frame in frames){using (var memoryStream new MemoryStream()){frame.Save(memoryStream, ImageFormat.Bmp);memoryStream.Position 0;var image new MagickImage(memoryStream);image.AnimationDelay Convert.ToUInt32( 100 / frameRate); // 设置帧延迟collection.Add(image);}}// 优化GIFcollection.Optimize();collection.Write(filePath);}}主要用到第三方nuget包AnimatedGifMagick.NET-Q16-AnyCPU结束语感谢各位耐心查阅 如果您有更好的想法欢迎一起交流有不懂的也可以微信公众号联系博主作者公众号会经常发一些实用的小工具和demo源码需要的可以去看看另外如果觉得本篇博文对您或者身边朋友有帮助的麻烦点
版权声明:本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

汕头网站快速排名提升自媒体申请注册

MiniCPM 4.1:重新定义端侧AI体验的混合智能引擎 【免费下载链接】MiniCPM4.1-8B 项目地址: https://ai.gitcode.com/OpenBMB/MiniCPM4.1-8B 在人工智能加速向边缘设备渗透的浪潮中,OpenBMB团队推出的MiniCPM系列大语言模型正以革命性的技术突破重…

张小明 2026/1/10 12:31:46 网站建设

创意赣州网站建设阿里巴巴官网入口

在全球化的商业环境中,企业常常面临多语言文档处理的挑战,特别是阿拉伯文和俄文这两种从右到左和从左到右文字系统的混合识别问题。PaddleOCR最新版本通过创新的双向文本流处理技术,成功实现了对复杂多语言场景的高精度识别。 【免费下载链接…

张小明 2026/1/10 14:01:42 网站建设

网站应用开发怎么样做国际网站生意

快速体验 打开 InsCode(快马)平台 https://www.inscode.net输入框内输入如下内容: 制作一个交互式学习页面,通过动画演示SSL/TLS握手过程,重点说明:1) 证书链如何工作 2) 常见错误原因图解 3) 分步解决向导。要求包含&#xff1a…

张小明 2026/1/11 1:31:22 网站建设

商品网站策划书专业手机网站有哪些

在软件开发领域,测试是确保软件质量的重要环节。面试是评估软件测试人员技能和经验的关键时刻。在一个软件测试面试中,面试官通常会问一系列问题来评估面试者的知识、技能和解决问题的能力。本文将介绍一些常见的软件测试面试问题,并给出一些…

张小明 2026/1/11 14:01:19 网站建设

做菠菜网站好赚吗m导航网站如何做淘宝客

在传统干部人事管理中,简历筛选靠人工、能力评估凭经验、晋升决策拍脑袋的情况并不少见,不仅效率低,还容易因主观判断出现偏差。而AI干部人事管理系统的出现,就像给人事工作装上了“智能大脑”,用实打实的技术解决这些…

张小明 2026/1/12 6:11:04 网站建设

济南网站建设优化百家号wordpress多主题模式

厌倦了单调的网速显示?想要在Windows任务栏上打造专属的信息中心?TrafficMonitor插件系统正是你需要的完美解决方案!这个强大的扩展框架能够让你在任务栏实时展示天气、股票、硬件状态等多样化信息,彻底告别枯燥的系统监控体验。 …

张小明 2026/1/12 6:12:42 网站建设