Despite what Sergey says, it is possible. I'm creating a .gif and wanted all my images padded to maintain a constant width and height. Here I look through my array of images to go into the .gif and find the maximum height and width.
I then set my canvas to be the maximum height and width and colour all it's pixels white (there may well be a more efficient way of doing this rather than going pixel by pixel). If you want to get the pixel colour, you just use the GetPixel option. These are only available with bitmaps - not images.
I then get my x and y offsets so I can position the image in the centre of the canvas and then save this to my aryImages(i)._Image_Resized variable or you can save straight to file.
This may be a couple of years too late to help you but hopefully will help other people with the same issue.
Dim MaxWidth As Integer = 0
Dim MaxHeight As Integer = 0
For i = 1 To aryImageCount
If aryImages(i)._Image.Width > MaxWidth Then MaxWidth = aryImages(i)._Image.Width
If aryImages(i)._Image.Height > MaxHeight Then MaxHeight = aryImages(i)._Image.Height
Next
Dim canvasWidth As Integer = MaxWidth
Dim canvasHeight As Integer = MaxHeight
Dim x_offset As Integer
Dim y_offset As Integer
For i = 1 To aryImageCount
Dim Canvas As Bitmap = New Bitmap(canvasWidth, canvasHeight)
Dim gfx As Graphics = Graphics.FromImage(Canvas)
For y As Integer = 0 To canvasHeight - 1
For x As Integer = 0 To canvasWidth - 1
Canvas.SetPixel(x, y, Color.White)
Next
Next
x_offset = (MaxWidth - aryImages(i)._Image.Width) / 2
y_offset = (MaxHeight - aryImages(i)._Image.Height) / 2
gfx.DrawImage(aryImages(i)._Image, x_offset, y_offset, aryImages(i)._Image.Width, aryImages(i)._Image.Height)
aryImages(i)._Image_Resized = New Bitmap(Canvas)