Home All Groups Group Topic Archive Search About

Saving an image from a picturebox

Author
23 Nov 2007 8:55 AM
Bart Steur
Hi,

I'm using VB 2005 EX.

I want to save an image from a picturebox control, but with the dimensions
of the picturebox control.

I have a pb control of 300x300. I load a image into that picturebox with a
size of 1024x1024. The pb sizemode is set to stretch, so the picture is
resized.
Now I use pb.image.save, but it's not 300x300. It's still 1024x1024. What do
I have to do to save the resized image.

Thanks,
Bart

Author
23 Nov 2007 7:21 PM
Cor Ligthert[MVP]
Bart,

That depends how you do it, however you have to remove pixels and that will
probably not forever give the same as you think.

However have a look at the drawing class which gives a lot of tools for
that.

Cor
Author
26 Nov 2007 10:47 AM
Terry Burns
Hi Cor,

Long time no speak :) Hows things my freind ?




Show quoteHide quote
"Cor Ligthert[MVP]" <notmyfirstn***@planet.nl> wrote in message
news:A26A4B9F-C160-4731-B41E-8C4E0472FB8F@microsoft.com...
> Bart,
>
> That depends how you do it, however you have to remove pixels and that
> will probably not forever give the same as you think.
>
> However have a look at the drawing class which gives a lot of tools for
> that.
>
> Cor