eramgarden
Well-known member
- Joined
- Mar 8, 2004
- Messages
- 579
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:
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:
Code:
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()