0

I have multiple image(near by 40 images), I need to combine these images as single image. I have referred the below link, Combine two Images into one new Image

but I dint find anything like Graphics in UWP. How toacheive this requirement

Devi M
  • 39
  • 5

1 Answers1

0

Making a render target bitmap and draw the image to render target bitmap.

The example that how to draw image to render target bitmap.

And you can save render target bitmap to file, see http://jamescroft.co.uk/blog/how-to/storing-a-uwp-inkcanvas-drawing-as-an-image-in-a-storagefile/

lindexi
  • 4,182
  • 3
  • 19
  • 65
  • My requirement is to combining the multiple images as one without adding the images in visual. But when using RenderTargetBitmap, we have to add the UIElement(multiple images) in visual in order to render. – Devi M Jun 25 '18 at 06:07
  • @DeviM You can use the UIElement but you shouldnt add the element to visual tree. And why is your question that without adding the images in visual for you want to re-render an image that you must decode the image and make it to the Image Control is a easy way to do it. – lindexi Jun 25 '18 at 06:19
  • @DeviM You can use the `BitmapEncoder` to decode without adding the image in visual but it work as the Image Control. – lindexi Jun 25 '18 at 06:21
  • In my case I want to add and remove images based on the pinching level(zoom level). If I directly use image control, I am getting flickering effect while adding and removing the images. That's why I want to combine multiple images as single one. – Devi M Jun 25 '18 at 06:46
  • If possible could you share a simple sample using BitmapEncoder? – Devi M Jun 25 '18 at 06:46
  • @DeviM The flickering effect is caused by you change the images's source in a short time, if you want to avoid it, you can use the [animation](https://learn.microsoft.com/en-us/windows/uwp/design/motion/xaml-animation) to change the images with a progress. – Breeze Liu - MSFT Jun 27 '18 at 02:12