小编Ste*_*127的帖子

ROS中spin和rate.sleep的区别

我是ROS的新手并试图理解这个强大的工具.我对spin和rate.sleep函数感到困惑.任何人都可以帮助我区分这两个功能以及何时使用哪个?谢谢.

ros

6
推荐指数
1
解决办法
2万
查看次数

删除其他进程正在使用的图像

我正在用C#编写一个winform应用程序来打开一个图像并在其上面叠加另一个图像.

底部图像是.jpg,顶部图像是.svg转换的.bmp..jpg和.svg是我想要保留在文件夹中的唯一内容..bmp作为临时工作.

我使用以下代码覆盖图像.但我很难删除临时.bmp,因为它被另一个进程使用.我认为这个组合代码仍然可以访问最后一个.bmp文件.

有人可以帮我吗?谢谢.

    private void buttonSearch_Click(object sender, EventArgs e)
    {
        FailInfo.Text = "";

        deletebmp(strFolderPath); 

        ...

        // Check if the specified front image exists. Yes, show the file name and convert SVG to BMP. No, show the error msg.
        if (File.Exists(strFilePathF))
        {
            labelFront.Text = strFileNameF;
            var svgConvert = SvgDocument.Open(svgFilePathF);
            svgConvert.Draw().Save(bmpFilePathF);
            pictureBoxFront.Image = Image.FromFile(strFilePathF);
        }
        else
        {
            labelFront.Text = "Couldn't find the file!";
            pictureBoxFront.Image = null;
        }

        // Check if the specified back image exists. Yes, show the file name and …
Run Code Online (Sandbox Code Playgroud)

c# svg

4
推荐指数
1
解决办法
7477
查看次数

标签 统计

c# ×1

ros ×1

svg ×1