On May 22, 5:59 pm, "Mike Fellows"
<mike.fell...@equityhouse.NO.SPAM.co.uk> wrote:
> I have some images stored locally that i retrieve and insert into a word
> document that is programatically created
[quoted text clipped - 19 lines]
>
> Mike Fellows
Hi Mike,
You can resize images with manipulating bitmap object. There are some
samples on the net, however this will also works for you:
' Optional, Drawing is referenced by default in VS
Imports System.Drawing
'Declare source / old bitmap
Dim bitmap As Bitmap = New Bitmap("file_path")
'Declare new / target bitmap
Dim newbitmap As Bitmap = New Bitmap(CInt(width_here),
CInt(height_here))
'Declare graphic taken from new bitmap
Dim g As Graphics = Graphics.FromImage(newbitmap)
'Draw the new graphic
g.DrawImage(bitmap, 0, 0, newbitmap.Width, newbitmap.Height)
' Save the image with jpeg format
newbitmap.Save("path",imaging.imageformat.jpeg)
Hope this helps,
Onur Güzel