0

Можно такие же действия сделать с BitmapImage?

1.

image = Image.FromStream(ms, true);

2.

public static void UpdateScreen(ref Image screen, Image newScreen, Rectangle bounds)      
{       
    if (screen == null) screen = new Bitmap(bounds.Width, bounds.Height);

    Graphics g = null;

    try
    {
        g = Graphics.FromImage(screen);
        g.DrawImage(newScreen, bounds);
        g.Flush();
    }
    catch
    {

    }
    finally
    {
        if (g != null) g.Dispose();
    }
}

Конвертация из Bitmap в BitmapImage не выход, сильно нагружается процессор, а таких действий очень много.

1 ответ 1

-3

Используйте класс WriteableBitmap.

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.