Click to See Complete Forum and Search --> : Thumbnails
ZanM
Oct 14th, 1999, 02:10 PM
iwant to make a little pic browser like CompuPic or the browser in psp, how would i scale all the images in a folder into thumb nails i'm lost......
SteveCRM
Oct 14th, 1999, 10:26 PM
I know how to make one image smaller, you can fiddle with the code and make the thumbnail the right size. You can make it so every file comes out that size somehow.....
Put A Picture On The Form And,
Private Sub Form_Load()
Dim HeightPercent, WidthPerccent As Integer
Dim MaxSize As Integer
MaxSize = 1000 ' Let's say that the biggest width is 1000 twips...
Image1.Stretch = True 'Make it stretchable.
If Image1.Width > Image1.Height Then
' Get the % of the height to the width:
HeightPercent = Int(((Image1.Height / Image1.Width) * 100))
Image1.Width = MaxSize
Image1.Height = HeightPercent * 10
ElseIf Image1.Width < Image1.Height Then
' Get the % of the width to the height:
WidthPercent = Int(((Image1.Width / Image1.Height) * 100))
Image1.Height = MaxSize
Image1.Width = WidthPercent * 10
ElseIf Image1.Width = Image1.Height Then
' If the image is the same width and height, then just set
' both to the MaxSize.
Image1.Width = MaxSize
Image1.Height = MaxSize
End If
End Sub
Hope It Helps,
Steve :)
jkurpias
Nov 16th, 1999, 03:19 AM
Checkout AU2Thumbs at Download.com
Its a great shareware product: cheap and does it all.
Then checkout the Kodak THumbnail control that ships with VB.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.