Windows phone 7 如何将两个图像合并为一个?

Windows phone 7 如何将两个图像合并为一个?,windows-phone-7,graphics,merge,bitmap,Windows Phone 7,Graphics,Merge,Bitmap,我有一个不透明度约为70%的遮罩图像,还有一个从服务器下载的图像。如何将它们重绘为单个图像,使下载的图像位于遮罩图像的正下方?我不想使用画布,因为我将使用合并图像作为全景背景,而画布将无法工作 大概是这样的: using (Graphics grfx = Graphics.FromImage(image)) { grfx.DrawImage(newImage, x, y) } 我试过了,但没有成功: BitmapImage bmp = new BitmapImage()

我有一个不透明度约为70%的遮罩图像,还有一个从服务器下载的图像。如何将它们重绘为单个图像,使下载的图像位于遮罩图像的正下方?我不想使用画布,因为我将使用合并图像作为全景背景,而画布将无法工作

大概是这样的:

using (Graphics grfx = Graphics.FromImage(image))
{
    grfx.DrawImage(newImage, x, y)
}
我试过了,但没有成功:

        BitmapImage bmp = new BitmapImage();
        BitmapImage bi = new BitmapImage();

        ImageBrush imageBrush = new ImageBrush();
        ImageBrush imageBrush2 = new ImageBrush();

        bi.UriSource = new Uri("Images/MainPage/mask_bg.png", UriKind.Relative);
        bmp.UriSource = new Uri("Images/MainPage/covertart_bg.jpg", UriKind.Relative);

        TranslateTransform translate = new TranslateTransform
        {
            X = 0,
            Y = 0
        };
        imageBrush.ImageSource = bmp;
        ImageCanvas canvas = new ImageCanvas();
        canvas.Background = imageBrush;

        WriteableBitmap w_bitmap = new WriteableBitmap(1065, 800);
        w_bitmap.Render(canvas, translate);
        w_bitmap.Invalidate();

        imageBrush2.ImageSource = w_bitmap;
        mainPanorama.Background = imageBrush2;

使用项目中的
Blit
方法

使用项目中的
Blit
方法

通读这篇文章,有很多有用的信息。谢谢Matt,你总是给我最好的答案:尽我所能创造出我想要的效果,但是有一个限制,我发布了一个新问题,请看一看这篇文章,这么多有用的信息。谢谢Matt,你总是给出最好的答案:尽我所能创造出我想要的效果,但是有一个限制,我发布了一个新问题,请看一看