Hi, I'm a newbie to VB.NET and I am trying to create thumbnails from .jpg
files (my travel pictures) to
post on a website. I want to create an executable that I can put in a
directory containing my jpg images which will create the thumbnails with a
"-t.jpg" extenstion. I found this code below which will create a thumbnail
from a specified file, "randomphoto.jpg".
Sub Thumbnail()
Dim myCallback As System.Drawing.Image.GetThumbnailImageAbort
Dim myPtr As IntPtr
Dim myPic As New Bitmap("E:\randomphoto.jpg")
Dim myThumb As System.Drawing.Image = myPic.GetThumbnailImage(100, 100,
myCallback, myPtr)
myThumb.Save("E:\mythumb.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
End Sub
How can I alter this code to pick out any .jpg file in the current directory
and create a thumbnail. Do I use a looping structure to read each file and
run the above module? Any help in pointing me in the right direction
appreciated.
James