屏幕录制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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • http://oncenote.com/2015/09/16/Security-2-HTTPS2/ (轉載)

    http://oncenote.com/2015/09/16/Security-2-HTTPS2/ (轉載)上一篇《iOS安全系列之一:HTTPS》被CocoaChina转载,还顺便上了下头条:打造安全的App!iOS安全系列之HTTPS,但那篇文章只是介绍了比较偏应用的初级知识,对于想要深入了解HTT

    2022年7月2日
    26
  • 三期_day12_其它+jetty的使用

    三期_day12_其它+jetty的使用

    2022年2月3日
    42
  • 《Qt 实战一二三》

    《Qt 实战一二三》Qt基础与实战,主要包含:环境搭建、信号槽、事件机制、数据类型、常用部件/布局、对话框、QPainter绘图等内容。

    2022年6月30日
    28
  • java.math.BigDecimal 比较大小

    java.math.BigDecimal 比较大小BigDecimala=newBigDecimal(101);BigDecimalb=newBigDecimal(111);//使用compareTo方法比较//注意:a、b均不能为null,否则会报空指针if(a.compareTo(b)==-1){System.out.println("a小于b");}if(a.compareTo(b)==…

    2022年7月14日
    32
  • Python控制手机_能控制玩手机的软件

    Python控制手机_能控制玩手机的软件1.配置Python环境变量Python环境变量安装较为简单,比较常用的方式是直接百度Anaconda并且下载安装,安装过程中可直接选择自动配置环境变量,在此不再赘述。2.安装Python编辑器,并在其中配置Python编辑器常用的是PyCharm,属于和IDEA一家公司的软件,这个软件对于学生有免费优惠,大学生可以直接去它官网申请,好像是需要一年一申,当然不缺钱的话也可以直接购买。3.安装控制包uiautomator2,和其它辅助包安装完后,想要控制手机,还需要安装…

    2022年8月12日
    7
  • Spring AOP 实现原理

    Spring AOP 实现原理什么是AOPAOP(Aspect-OrientedProgramming,面向方面编程),可以说是OOP(Object-OrientedPrograming,面向对象编程)的补充和完善。OOP引入封装、继承和多态性等概念来建立一种对象层次结构,用以模拟公共行为的一个集合。当我们需要为分散的对象引入公共行为的时候,OOP则显得无能为力。也就是说,OOP允许你定义从上到下的关系,但并不适合定义从

    2022年7月12日
    15

发表回复

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

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