屏幕录制gif软件_手机录屏咋录内部声音

屏幕录制gif软件_手机录屏咋录内部声音效果图如下:铜鼓录制屏幕的区域可以预览生成的GIF图片图片比较清晰源码中可以修改gif质量源码中可以修改gif帧数通过鼠标选择需要的区域FrmRectfrmRect=newFrmRect();frmRect.ShowDialog();m_rect=frmRect.Rect;label4.Text=”区域设定完成”;protec..

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

效果图如下:

屏幕录制gif软件_手机录屏咋录内部声音

工程源码见文章结尾

通过录制屏幕的区域 可以预览生成的GIF图片 图片比较清晰 源码中可以修改gif质量 源码中可以修改gif帧数 通过鼠标选择需要的区域

屏幕录制gif软件_手机录屏咋录内部声音

 屏幕录制gif软件_手机录屏咋录内部声音

屏幕录制gif软件_手机录屏咋录内部声音


            FrmRect frmRect = new FrmRect();
            frmRect.ShowDialog();
            m_rect = frmRect.Rect;
            label4.Text = "区域设定完成";
   protected override void OnLoad(EventArgs e) {
            Rectangle rect = Win32.GetDesktopRect();
            this.Location = rect.Location;
            this.Size = rect.Size;

            m_img = this.GetScreen();
            m_imgDark = new Bitmap(this.Width,this.Height);
            using (SolidBrush sb = new SolidBrush(Color.FromArgb(127, 0, 0, 0))) {

.......
}

  private Image GetScreen() {
            Bitmap bmp = new Bitmap(this.Width, this.Height);
            using (Graphics g = Graphics.FromImage(bmp)) {
                g.CopyFromScreen(0, 0, 0, 0, bmp.Size);

 屏幕录制gif软件_手机录屏咋录内部声音

  if (btn_start.Text == "开始录制")
            {
                if (m_scrRecorder != null) m_scrRecorder.Clear();
                m_scrRecorder = null;

                if (m_scrRecorder == null)
                {
                    if (m_rect != Rectangle.Empty)
                    {
                        m_scrRecorder = new ScreenRecorder(m_rect, 100);
                        

                    }
                    else
                    {
                        MessageBox.Show("确保对应的录制方式 有选择数据");
                        return;
                    }
                }
                m_scrRecorder.DrawCursor = chk_drawMouse.Checked;
                m_scrRecorder.Start();
                btn_start.Text = "停止";
                btn_preview.Enabled = false;
                label4.Text = "正在录制";

            }
            else
            {
                m_scrRecorder.Stop();
                btn_start.Text = "开始录制";
                 btn_preview.Enabled = true;
                label4.Text = "录制完成";

            }
        }

屏幕录制gif软件_手机录屏咋录内部声音

 private string GetImageHash(Image img)
        {
            using (MemoryStream ms = new MemoryStream())
            {
                img.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
                byte[] byImg = new byte[ms.Length];
                ms.Seek(0, SeekOrigin.Begin);
                ms.Read(byImg, 0, byImg.Length);
                return BitConverter.ToString(System.Security.Cryptography.MD5.Create().ComputeHash(byImg)).Replace("-", "");
            }
        }
    }

屏幕录制gif软件_手机录屏咋录内部声音

       private bool m_bGet;
        private GIFColorDepth m_cd;
        private List<byte> m_lst = new List<byte>();


        private int m_nIndexTrans;                        // transparent index in color table
        private int m_nRepeat = 0;                        // 0=repeat forever

        private byte[] m_nIndexedPixels;                  // converted frame indexed to palette
        private byte[] m_byColorTabs;                     // RGB palette
        private bool[] m_bUsedEntrys = new bool[256];     // active palette entries
        private int m_nPalSize = 7;                       // color table size (bits-1)
        private int n_nDispose = -1;                      // disposal code (-1 = use default)
        private bool m_bFirstFrame = true;

        public GIFCreator(int nWidth, int nHeight, GIFColorDepth cd) {
            this._Width = nWidth;
            this._Height = nHeight;
            m_cd = cd;
            m_lst.AddRange(Encoding.ASCII.GetBytes("GIF89a"));
            this.WriteLSD();    // logical screen descriptior
        }

        public void AddFrame(Image img, int nSleep) {
            if (m_bGet) {       //如果获取过图像数据 那么把末尾的结束标志去掉
                m_lst.RemoveAt(m_lst.Count - 1);
                m_bGet = false;
            }
            this.AnalyzePixels(this.GetImagePixels(img));   // build color table & map pixels
            if (m_bFirstFrame) {
                this.WritePalette();                        // global color table
                if (m_nRepeat >= 0) {
                    this.WriteNetscapeExt();                // use NS app extension to indicate reps
                }
            }
            this.WriteGraphicCtrlExt(nSleep);               // write graphic control extension
            this.WriteImageDesc();                          // image descriptor
            if (!m_bFirstFrame) {
                this.WritePalette();                        // local color table
            }
            this.WritePixels();                             // encode and write pixel data
            m_bFirstFrame = false;
        }

屏幕录制gif软件_手机录屏咋录内部声音


项目链接

GIF录屏制作工具_录制屏幕生成GIF-C#文档类资源-CSDN下载

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/191571.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • JS中clientHeight、scrollHeight和offsetHeight的大坑,滚动条抖动问题解决

    JS中clientHeight、scrollHeight和offsetHeight的大坑,滚动条抖动问题解决JS中clientHeight、scrollHeight和offsetHeight的大坑,滚动条抖动问题解决1.什么是clientHeight、scrollHeight和offsetHeight1.1clientHeight是什么1.2offsetHeight是什么1.3clientHeight和offsetHeight的注意点1.4scrollHeight和它的大坑jQuery和原生js…

    2022年7月24日
    14
  • vue遍历渲染数组「建议收藏」

    vue遍历渲染数组「建议收藏」<divv-for=”iteminuserAllInfo.adevarUserSkills”:key=”item.id”>{{item}}</div>v-for=”单个数据in数组”:key=“单个数据.主键”(主键唯一)不是对象无需主键

    2022年10月7日
    2
  • scss和sass区别_Sass和SCSS有什么区别?

    scss和sass区别_Sass和SCSS有什么区别?scss 和 sass 区别 Thisistheupd 2014 这是最初于 2014 年 4 月 28 日发布的文章的更新版本 I vewrittenalo butsomecomme

    2025年7月9日
    3
  • winrar下载_标致408后尾晃完美解决方案

    winrar下载_标致408后尾晃完美解决方案本文参考撸Linux的文章https://www.lulinux.com/archives/13192018年wineQQ最完美解决方案(多Linux发行版通过测试并稳定运行)腾讯官方早就在10年代初就停止运营Linux版QQ,然而民间折腾Linux版QQ的脚步从来没停过。时至今日,它总算有了完美无暇的方案——deepinwine系列。要感谢deepin公司的最大努力。也…

    2025年9月16日
    4
  • 推荐5款开源报表工具下载_开源报表系统

    推荐5款开源报表工具下载_开源报表系统小编最近发现几款不错的开源报表,还提供源码,现在给大家分享一下,希望能给你带来帮助!1、项目名称:积木报表项目简介:积木报表,免费的企业级WEB报表工具。专注于“专业、易用、优质”的报表设计器和大屏设计器。支持打印设计、数据报表、图形报表、大屏设计器,重点是免费的。项目地址:http://www.jimureport.com/2、项目名称:UReport2项目简介:UReport2是一款高性能的Java报表引擎,提供完善的基于网页的报表设计器,可快速做出各种复杂的中式报表。在UR

    2022年10月20日
    2
  • pycharmlinux安装教程_深度linux系统官网

    pycharmlinux安装教程_深度linux系统官网Linux系统下PyCharm的安装1.什么是PyCharm2.什么是IDE3.PyCharm的安装4.PyCharm的使用5.pycharm的一些快捷键1.什么是PyCharmPyCharm是一种PythonIDE,带有一整套可以帮助用户在使用Python语言开发时提高其效率的工具,比如调试、语法高亮、Project管理、代码跳转、智能提示、自动完成、单元测试、版本控制。此外…

    2022年8月28日
    5

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号