eramgarden Posted March 30, 2004 Posted March 30, 2004 I followed the example on this website: http://www.eggheadcafe.com/articles/20030515.asp To convert a HUGE Tiff to a samller JPeg image .. to reduce the dimenstions ....it converts the image to JPeg but still the weidth and height remain the same...it does NOT reduce the height and weidth to a smaller image.. What am I missing?? This is what I have: Dim strFileToConvert As String strFileToConvert = "C:\IP\W0008-01-01.tif.jpeg" 'Initialize the bitmap object by supplying the image file path Dim b As New Bitmap(strFileToConvert) Dim g As Graphics = Graphics.FromImage(b) g.CompositingQuality = Drawing2D.CompositingQuality.HighQuality g.SmoothingMode = Drawing2D.SmoothingMode.HighQuality g.InterpolationMode = Drawing2D.InterpolationMode.HighQualityBicubic Dim newrec As Rectangle = New Rectangle(0, 0, 50, 50) g.DrawImage(b, newrec) b.Save(strFileToConvert & ".jpeg", System.Drawing.Imaging.ImageFormat.Jpeg) g.Dispose() Quote
*Experts* mutant Posted March 30, 2004 *Experts* Posted March 30, 2004 Use the GetThumbnailImage method of the Bitmap object to return a scaled image. Quote
eramgarden Posted March 30, 2004 Author Posted March 30, 2004 Thanks, Used this example of GetThumbnailImage: http://aspnet.4guysfromrolla.com/articles/012203-1.aspx Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.