Use PNG files, they are in a way compressed BMPs. They give same quality at
a much smaller size.
).Save(Request.PhysicalApplicationPath & "images\" &
strIDProducto & ".png", System.Drawing.Imaging.ImageFormat.PNG)
"Herfried K. Wagner" <aon.912666908.N.O.S.P.@.M.aon.at> wrote in message
news:e$g46dmRDHA.2084@TK2MSFTNGP11.phx.gbl...[color=blue]
> Hello,
>
> "Gustavo De la Espriella" <qq@qqq.qq.qq> schrieb:[color=green]
> > How can I create a file from another picture file with a
> > different size (mantaining a decent quality)?[/color]
>
> \\\
> Dim bmp As New Bitmap( _
> "C:\Lagoon1024x768.bmp" _
> )
> Dim bmp2 As New Bitmap( _
> bmp.Width * 0.1, _
> bmp.Height * 0.1, _
> Imaging.PixelFormat.Format24bppRgb _
> )
> Dim g As Graphics = Graphics.FromImage(bmp2)
>
> ' Select/change interpolation mode here.
> g.InterpolationMode = _
> Drawing.Drawing2D.InterpolationMode.HighQualityBic ubic
>
> ' Draw image using specified interpolation mode.
> g.DrawImage(bmp, 0, 0, bmp2.Width, bmp2.Height)
> Me.PictureBox1.Image = bmp2
> bmp2.Save("C:\foo.bmp")
> ///
>
> Regards,
> Herfried K. Wagner
> --
> MVP · VB Classic, VB .NET
>
http://www.mvps.org/dotnet
>
>[/color]