1
votes

I am creating a Windows Phone Application, in which i require an image (let it be image1). I have 100 other images, what i want is to overlap each image, to the image1 when needed.

(Note: I want to save the image after editing)

What will be the possible way to create this in Windows Phone.

I am familiar with C# in WPForms, and i used this code before...

//In this code i am drawing 2.png on 1.png

        string imageFilePath = @"D:\1.png";
        Bitmap bitmap = (Bitmap)Image.FromFile(imageFilePath);//load the image file

        string image = @"D:\2.png";
        Bitmap bitmap2 = (Bitmap)Image.FromFile(image);//load the image file

        using (Graphics graphics = Graphics.FromImage(bitmap))
        {
            graphics.DrawImageUnscaled(bitmap2, 5, 5);
        }
1
one question posted for the same was stackoverflow.com/questions/12453528/… but no response.... - Navjot Singh

1 Answers

0
votes

Try This:

WriteableBitmap bmpCurrentScreenImage = new WriteableBitmap((int)this.ActualWidth, (int)this.ActualHeight);
bmpCurrentScreenImage.Render(LayoutRoot, new MatrixTransform());
bmpCurrentScreenImage.Invalidate();

Save Bitmap bmpCurrentScreenImage where You want to save.