Convert between different image formats
Use the THBImageEdit object to load one of the supported raster image formats and save them into a different format.
Dim ie As New THBImageEdit
' Load your source file
ie.LoadPictureFromFile "C:\yourfile.jpg", thbifAutoDetect
'Destination filename
strFileNew = "C:\YourPath\YourFile.bmp"
'Set format dependent properties
ie.FileFormatSettings.BMPUseRLE = True
'And save as Windows BMP
ie.SavePictureToFile strFileNew, thbifBMP
In this way you can easily convert between all common raster image formats like PSD, PDF, GIF, JPG, TIF, Jpeg2000, Jbig2, PNG, …
Some fileformats have to be plugged into the THBImageEdit object separately.
' add Jpeg2000
ie.ImportExportDllAdd "THBJ2k20.dll", ""
' add Jbig2
ie.ImportExportDllAdd "THBJbg20.dll", ""



RSS News Feed