1

嘿,我想弄清楚为什么当我翻转图像时它会使用大量 RAM 和 CPU(它是四核 i7)

我使用这段代码:

Dim filter As New RotateBilinear(180, True)
image = Filter.Apply(image)

  If bIsToRecord Then
        If writer Is Nothing Then
            Dim [date] As DateTime = DateTime.Now
            Dim fileName As [String] = [String].Format("{0},{1}.avi",[date].Minute, [date].Second)

            Try
                OpenWriter(fileName, image.Width, image.Height)
            Catch ex As Exception
                If writer IsNot Nothing Then
                    writer.Dispose()
                    writer = Nothing
                End If
            End Try
        End If

        Try
            If radioButton1.Checked Then
                writer.AddFrame(image)
            Else
                mVideoFileWriter.WriteVideoFrame(image)
            End If
        Catch ex As Exception
            System.Diagnostics.Trace.WriteLine(ex.ToString())
        End Try
    End If

在此处输入图像描述 那就是不翻转图像

在此处输入图像描述 随着翻转...

每个屏幕截图持续 30 秒。

这可能是什么原因造成的?

4

0 回答 0