Convert (DDE Command)

 

 

Syntax:                Convert(format;extension;retain-comments;reset-date;format-options;output-path)

Abbreviation:                N(format;extension;retain-comments;reset-date;format-options;output-path)

 

This command converts any selected files to the specified format. For GIF, TIFF and JPEG formats, you may specify various options. Files with the same name are overwritten.

 

You can also specify whether comments should be retained or dropped, and set the converted files' creation time to that of the original.

 

 

Convert command parameters:

 

Parameter

Valid values

Description

format

jpg gif tif bmp pcx tga wmf

The format for the converted files.

extension

 

The extension to use (generally the same as the format).

retain-comments

0, 1

Specify zero (0) to remove image comments, or one (1) to retain them.

reset-date

0, 1

When 1, the converted file will receive the same date and time as the original file.

format-options

See below

Options required for some file types (GIF, JPG, TIF).

output-path

 

The complete folder path where ThumbsPlus will place the converted files.

 

 

Format-options for JPEG files:

 

Parameter

Valid values

Description

Quality

1-100

The quality level for JPEG compression. 75 is a good default; values below 50 usually generate unacceptable artifacts, and values above 90 usually cause larger files without appreciable visible improvement, so I recommend a number between 50 and 90.

Smoothing

0-50

The amount of smoothing to apply before compression. This is useful for converting dithered (i.e., GIF) images to JPEG. For photographic originals, you should specify zero (0).

Progressive

0, 1

Set this option to one (1) to enable progressive JPEG generations. Note that many programs do not yet support progressive JPEG files.

 

 

Format-options for GIF files:

 

Parameter

Valid values

Description

Interlaced

0, 1

Set to one (1) to generate an interlaced GIF file.

Minimize Size

0, 1

Set to one (1) to optimize the color table and remove duplicate colors, thus minimizing the file size.

Transparent

0, 1

Set to one (1) to generate a transparent GIF. Use the Transparent Color parameter to specify the transparent color.

Transparente Color

0,0,0 - 255,255,255

Specify the transparent color when generating transparent GIF files. This is an RGB value (red, green, blue), and should match one of the pixel values of the GIF file.

 

 

Format-options for TIFF files:

 

Parameter

Valid values

Description

Compression

lzw jpeg fax3 fax4 pack zip none

Specifies the compression method for the resulting TIFF file.

Quality

1-100

When using JPEG compression in TIFF files, specifies the quality level. See the notes above about JPEG files for further information.

Separate

0, 1

When set to one (1), specifies that image color planes should be stored separately. This often increases compressibility of 24-bit image files.

 

 

Examples:

 

Convert(jpg;jpg;0;1;75;0;0;c:\temp)

 

Converts the currently selected files to JPG with a quality level of 75, no smoothing, non-progressive, while removing comments and setting the file date to that of the original file.

 

Convert(gif;gif;1;0;1;1;0;0,0,0;c:\temp)

 

Converts the currently selected files to interlaced, non-transparent GIF files. Retains image comments and sets the date to when the file was converted.

 

Convert(bmp;bmp;0;0;c:\temp)

 

Converts the currently selected files to Windows Bitmaps. Removes comments and leaves the date as the converted date.

 

Convert(tif;abc;1;1;lzw;0;1;c:\temp)

 

Converts the currently selected files to TIFF with LZW compression and separated image channels. Retains comments and sets the TIFF files to the original files' dates.

 

LocateFile(c:\camera\pictures\kdc\*)

Convert(jpg;jpg;0;1;75;0;0;c:\camera\pictures\jpg)

UpdateDir(c:\camera\pictures\jpg)

 

Selects all files in the folder c:\camera\pictures\kdc, converts them to JPEG with a quality level of 75, eliminating comments and setting the file dates to the original KDC file dates, and outputs the JPEG files in c:\camera\pictures\jpg. Then, uses the UpdateDir command to create thumbnails for the converted files.