I'm loading layers of images to make a single image. I'm currently stacking them all onto a canvas. I've got it set up so the user can specify the final dimensions of the single image, but even when I change the size of the canvas the images retain their original sizes.
I tried to modify the image size as I was loading them in, but the sizes were NaN and the Actual Sizes were 0 so I couldn't change them there.
I'm starting to think that canvas might not be the way to go. Any suggestions to how I could clip images to fit a specific size?
canvas1.Children.Clear();
int totalImages = Window1.GetNumberOfImages();
if (drawBackground)
canvas1.Background = new SolidColorBrush(Color.FromArgb(a,r,g,b));
else
canvas1.Background = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0));
for (int i = 0; i < totalImages; i++)
{
Image image = new Image();
image.Source = Window1.GetNextImage(i);
canvas1.Children.Add(image);
}