WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

How To
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Convert Image to TIFF

 Keywords: TIFF TIF CONVERT picture image graphic 

The current Pixie extender cannot currently handle the TIFF file format. However there is FreeImage library available that can. You can make Dllcall's to its API's.

Here is some sample code that converts a PCX file to a TIFF file.

;use freeimage to convert an image
FIF_PCX     = 10
FIF_TIFF    = 18
pcxfile = "C:\Temp\Vin7200.pcx"
tifffile = strcat(filepath(pcxfile), fileroot(pcxfile), ".tif")
dllhandle = DllLoad("C:\Temp\Freeimage\FreeImage\FreeImage\Dist\FreeImage.dll")

;use freeimage to convert an image
image = DllCallcDecl(dllhandle, long:"_FreeImage_Load@12", long:FIF_PCX , lpstr:pcxfile, long:0)
x     = DllCallcDecl(dllhandle, long:"_FreeImage_Save@16", long:FIF_TIFF, long:image, lpstr:tifffile, long:0)
x     = DllCallcDecl(dllhandle, void:"_FreeImage_Unload@4", long:image)
DllFree(dllhandle)

Run(tifffile,"")
exit
The FreeImage SDK can be downloaded here: http://freeimage.sourceforge.net/

See also:
How To Convert TIF to JPG.txt


Article ID:   W16991
File Created: 2014:07:18:09:51:38
Last Updated: 2014:07:18:09:51:38