CreateThumb_IrfanView

Creates a thumb of an image using IrfanView
Thumbnail filename will have _th at end of filename
Having i_view32.exe file (attached) in a subfolder next to workbook

Sub CreateThumb_IrfanView(ImageFile, Optional Wi=200, Optional He=200, Optional IVFol = "Resources")
 ThumImg = "MyPix" & i & "_th." & Right(ImageFile, 3)
 Cmd1 = FixPath(FixPath() & IVFol) & "i_view32.exe "
 Cmd2 = DataFol & ImageFile
 Cmd3 = " /resize=(" & Wi & "," & He & ") /aspectratio /convert="
 Cmd4 = FixPath(GetPapa(ImageFile)) & ThumImg
 Shell Cmd1 & Cmd2 & Cmd3 & Cmd4
 DoEvents
End sub

Parameters

ImageFile, Optional Wi, Optional He, Optional IVFol

Views 126 Downloads 57

Perm link