Toon Boom Harmony 10.3
Toon Boom Utilities Guide

Toon Boom Harmony 10.3Toon Boom Utilities Guide

Legal Notices
Toon Boom Animation Inc.
4200 Saint-Laurent, Suite 1020
Montreal, Quebec, Canada
H2W 2R2
Tel: +1 514 278 8666
Fax: +1 514 278 2666
toonboom.com
Disclaimer
The content of this guide is covered by a specific limited warranty and exclusions and limit of liability under theapplicable License Agreement as supplemented by the special terms and conditions for Adobe®Flash® File
Format (SWF). For details, refer to the License Agreement and to those special terms and conditions.
The content of this guide is the property of Toon Boom Animation Inc. and is copyrighted.
Any reproduction in whole or in part is strictly prohibited.
Trademarks
Toon Boom® is a registered trademark and Harmony™ is a trademark of Toon Boom Animation Inc.
Credits
Art Development: Shabana Ali, Marie-Eve Chartrand, Tania Gray, Annie Rodrigue, Anouk Whissell
Technical Editor: Peter Cawthorne, Pamela Grimaud, Liven Tam
Technical Reviewer: Joel Baril, Marc-André Bouvier-Pelletier, Lindsay Brown, Steve Masson, Elke Starck, Lilly
Vogelesang
Technical Writer: Shabana Ali, Marc-André Bouvier-Pelletier, Marie-Eve Chartrand, Christopher Diaz, Annie
Rodrigue, Liven Tam, Anouk Whissell
Publication Date2013-12-10
Copyright © 2013 Toon Boom Animation Inc., a Corus® Entertainment Inc. company. All rights reserved.
PUSG803HAR103EN

2

Toon Boom Harmony 10.3 Utilities Guide

Contents
Toon Boom Harmony 10.3Toon Boom Utilities Guide

1

Legal Notices

2

Contents

3

Chapter 1: Introduction to Utilities

5

Topics Covered

5

Running a Utility

7

Chapter 3: Utilities

9

Pdfimport Utility

10

Pix2vec Utility

11

Vectorization

19
19Black and White

19

Tones/highlights (B+W notriangles)

20

Greyscale rougher lines

20

Greyscale soft edge

21

How to Vectorize With Bubbles

21

Examples22

Swf2tvg Utility

25

Swfimport Utility

27

tvg2xml Utility

28

uinfo Utility

29

utransform Utility30

3Toon Boom Harmony 10.3 Utilities Guide

4

Toon Boom Harmony 10.3 Utilities Guide

Chapter 1: Introduction to Utilities

Toon Boom provides utilities that you can use in Command Prompt and Shells to provide more flexibility andcontrol over the different command options in Toon Boom Harmony.

Topics Covered•

Running a Utility on page 7•

Pdfimport Utility on page 10•

Pix2vec Utility on page 11•

Swf2tvg Utility on page 25•

Swfimport Utility on page 27•

tvg2xml Utility on page 28•

uinfo Utility on page 29•

utransform Utility on page 30

5

Toon Boom Harmony 10.3 Utilities Guide

6

Toon Boom Harmony 10.3 Utilities Guide

Running a Utility
Toon Boom includes a number of command line utilities that you can use to convert image formats, bitmap or
vector, into other image formats.
These command line utilities are found in your Toon Boom application folder.
For example, for Toon Boom Harmony 10.3:•

Using Windows, these utilities are located in: \Program Files\Toon Boom Animation\Toon Boom
Harmony 10.3\nt\bin•Using Mac OS X, these utilities are located in: /Applications/Toon Boom Harmony
10.3/tba/macosx/bin•

Using Linux, these utilities are located in: /usr/local/ToonBoomAnimation/harmony_10.0/lnx86/bin

To run these utilities, use a Command Prompt or a Terminal window. All of these utilities work on input files thatare processed using options you specify to produce an output.
To run a command line utility:
1. Open a Command Prompt (Windows) or Terminal (Mac OS X) window or a Console (Linux) window.
‣

Using Windows, click on the Start menu and select Programs > Accessories > Command Prompt.

‣

Using Linux, select Menu > System Tools > Terminal.

‣

Using Mac OS X, open a Finder window and select Applications > Utilities > Terminal

2. In the Command Prompt or Terminal window, switch to the directory that contains the image files thatyou want to process (element’s folder).

3. Type the name of the utility that you want to launch, the options and the name of the file you want toprocess. The options must be preceded by a dash (-).
Here is an example of how to launch utransform using Windows:‣

utransform -outformat TGA bg-1.tvg

7

Running a Utility

Here is an example of how to launch utransform using Mac OS X.:‣

utransform -outformat TGA bg-1.tvg

If another version of Toon Boom Harmony is still installed on the system, the utility application should
be launched from the \bin folder. This will make sure that the correct version of the utility is used.

•

If using Windows: \Program Files\Toon Boom Harmony 10.3\nt\bin\ utransform outformat•

If using Mac OS X: \Finder\Applications\Toon Boom Harmony 10.3\tba\macosx\bin>./utransform -outformat•

If using Linux: \usr\local\ToonBoomAnimation\harmony_10.0\lnx86\bin>./ utransform outformat

4. For help with the options and syntax of the utilities, open the help. To do this, type -help after the nameof the utility on the command line.
‣

type: utransform -help8

Toon Boom Harmony 10.3 Utilities Guide

Chapter 3: Utilities
This chapter describes all of the utilities, options and their uses:•

Pdfimport Utility on the next page•

Pix2vec Utility on page 11•

Swf2tvg Utility on page 25•

Swfimport Utility on page 27•

tvg2xml Utility on page 28•

uinfo Utility on page 29•

utransform Utility on page 30

9Chapter 3: Utilities Pdfimport Utility

Pdfimport Utility
The Pdfimport utility is used to import a .PDF or an .AI file as a template without going through the interface. It
allows more control and option flexibility over the imported file.
Here is the format you must follow when using Pdfimport:
Pdfimport [options] pdf or ai files
The available Pdfimport options are:
COMMANDACTIONAVAILABLE OPTIONS-outdir output_folder

This option defines the folder where the output files
will be saved. The defined path is not relative.

-outtemplate output_folder.tpl

This option defines the template name for theconverted pages. The defined path can be relative.

-PDF_SUPPORT_CMYKThis option will automatically convert CMYK colours to
RGB. Otherwise, CMYK colours would import as a red
colour.

-PDF_SEPARATE_LAYERS

This option will use the Illustrator top level groups as
separate drawing names.

-PDF_FLATTEN

Use this option to perform a flatten on each drawings
while importing.

Description of switches:-outtemplate output_folder.tpl

Output template name for converted pages.

-outdir dir

This option defines the output folder for the templates(the defined folder must already exists.)-usageThis option will display the usage.

-?|-h|-help|--help

This option will display the help information.

-v|-version|--version nThis option will display the version information.

•

The -outdir and -outtemplate options are exclusive; they cannot be used together.

•

You can only specify one file with the outtemplate option.

•

If the CMYK colours option is not enabled, the application will output the following error
message:
CMYK: Unsupported colorSpace•

Pdfimport does not overwrite existing templates, but will overwrite files in outdir.

10

Toon Boom Harmony 10.3 Utilities Guide

Pix2vec Utility
The Pix2vec program converts bitmap files, which can be generated during the scanning process, to Toonboom
Vector Graphic (TVG) files. TVG is the vector file format for Toon Boom professional software.
You can vectorize SCAN and other bitmap files by running Pix2vec from the command line. There are a number of
options you can use. To see a list of the vectorization options, type pix2vec --help or pix2vec -? .
Here is the format you must follow when using Pix2vec:$ Pix2vec -file [file name, including extension] [options]
Here are the available Pix2vec options:

COMMANDACTIONFILE IO OPTIONS-file <filename (including extension)> [options ]Use this option to define the file you want toperform Pix2vec on.

-infile <filename (including extension)>

This option is the same as -file.
Use this option to define the file you want toperform Pix2vec on.

-outfile <filename>

Use this option to rename the output file.

-informat <format>

This option defines the input format. Used if
reading from standard input.

-debugUse this option to turn on the debug mode.

-version

This option will display the version
information.

-output_version <version>

This option defines the output files of thisversion. Valid versions can be: 0 or 604. The
TVG format version is 604.

-noforce

This option will prevent the output image
from being forced if the image isinconsistent.

REGISTRATION OPTIONS-register

Use this option to perform opticalregistration. Follow this format:<dpi side strictness>;
The Side position can be left, right, top,bottom or l, r, t, b.
The Strictness can be either loose, strict or l,

11

Chapter 3: Utilities Pix2vec Utility

COMMANDACTIONs.

-registration_looseness_factor <factor>

Registration looseness factor (by default thelooseness factor is 2.0). This is used for
optical registration only and is calculated
mathematically by the system.

-rlfThis option is the short hand equivalent of
the registration_looseness_factor function.

-rdebug

This option output registration debug
messages-pegpitch <inch (default 8.000000)>

Use this option to customize the value of the
distance between the registration marks.

-threshr < (default 0.500000)>

Use this option to set the threshold value for
optical registration.
You can set the value in the range of 0.0 to
1.0.

-rmargin <inch (default 1)>

Use this option to define the size of theregion where registration marks can bedetected.

-peg_distance_from_center <inch (default
5.25)>

Use this option to determine the distance
between the centre of your page to the peg
registration marks.

-pdfc

This function is the short equivalent of peg_
distance_from_centre.
Use this option to determine the distance
between the centre of your page to the peg
registration marks.

-out_peg_position <side (default same)>

This option defines the wanted position of
the peg on the drawing.
The position can be right, left, top, bottom,
r, l, t, b or same.
A rotation will be performed if this position isdifferent from the side passed to -register.

-output_peg_matrix

This option outputs the peg transformation
matrix on standard output.

-scanner_calibrate < (default 1.0000 1.0000)>

This option sets the x and y scale factors tobe applied to scanner image.

FILTERING OPTIONS

12

Toon Boom Harmony 10.3 Utilities Guide

COMMANDACTION-pixel <pixel_shape (default '4x3')>

The valid value is: 4x3.

-gap <worldUnits (default 10)>

Use this option to set the size of gaps thatwill be automatically closed.

-pencil

Use this option to generate line art only.

-keep_dirt

Use this option to not filter dirt.

-thresh <threshold (default 0.2)>

Use this option to set the threshold value.

-rmv_hairs <worldUnits (default 1)> <passes(default 1)>

Use this option to remove hair smaller thanthe defined size in a specific number ofpasses.

-rmv_holes <area (default 7)>

Use this option to remove holes smaller thanthe defined area size.

-rmv_dirt <area (default 1)>

This option will remove dirt smaller than thedefined size. You can set values in the rangeof 100 to 500. The size, or area, is in world
units squared.

-rmv_triangles <worldUnits (default
30.000000)>

Use this option to remove triangles at thedefined pixel distance from each other.
You can use -no_break to remove alltriangles.

-no_textureThis option prevents textured strokes to begenerated.

-color_as_textureThis option will vectorize the alpha channel
and put the RGB colour in a textured colour.

-noclosegap

This option will prevent gaps from being
automatically closed.

-no_breakThis option disables the breaking of line art.

-jag_filter <pixels (default 0>This option will expand the pixels in thevectorization bitmap to give a jagged line amore straight and smooth result.
This makes use of the -expand_bitmap
option to expand the line by 1 or 2 pixels andthen contract it by the same amount,removing any jaggedness from the line in theprocess.

-expand_bitmap <pixels (default 0>This option expand the pixels in thevectorization bitmap.
This is used to thicken the line.

13

Chapter 3: Utilities Pix2vec Utility

COMMANDACTION-fit_errorc <error (default 1.000000>

This option defines the fit error for the colourart.
A fit error occurs when there are three points
on a curved or angled line and the system
misses the middle point. For example,
instead of a the line going from point 1 up to
point 2 and then down to point 3, to form acurve or angled line, it goes from point 1 topoint 3 missing point 2 and creating astraight line. Using the -fit_error option
eliminates this error.

-fit_errorl <error (default 1.000000>

This option defines the fit error for the lineart.
A fit error occurs when there are three points
on a curved or angled line and the system
misses the middle point. For example,
instead of a the line going from point 1 up to
point 2 and then down to point 3, to form acurve or angled line, it goes from point 1 topoint 3 missing point 2 and creating astraight line. Using the -fit_error option
eliminates this error.

-smoothl <passes (default 1>

This option defines the number of smooth
passes for the line art.

-smoothc <passes (default 1>

This option defines the number of smooth
passes for the colour art.

-first_smooth <passes (default 0>This option defines the number of smooth
passes on the line art before breaking
triangles.

-first_smoothl <passes (default 0>This option defines the number of smooth
passes for line art before breaking triangles.

-first_smoothc <passes (default 0>This option defines the number of smooth
passes to perform. For line art in colour art
pass (needs -2pass).

-2passThis option specify 2 sets of parameters; onefor line art "l", one for colour art "c"(-thresh,-rmv_holes and -rmv_dirt will be overridden
by -threshl, -threshc, -rmv_holesl, -rmv_
holesc, -rmv_dirtl and -rmv_dirtc).

-threshl <threshold for line art (default 0.5)>

This option sets the threshold value for theline art.

14

Toon Boom Harmony 10.3 Utilities Guide

COMMANDACTION
Range can be from 0.0 to 1.0.

-threshc <threshold for color art (default 0.5)>

This option sets the threshold value for thecolour art.
Range can be from 0.0 to 1.0.

-jag_filterl <pixels (default 0>This option expands the pixels in thevectorization bitmap for line art. To smoothand straighten jagged lines.

-jag_filterc <pixels (default 0>This option expands the pixels in thevectorization bitmap for colour art. Tosmooth and straighten jagged lines.

-expand_bitmapl <pixels (default 0>This option expands the pixels in thevectorization bitmap for line art.

-expand_bitmapc <pixels (default 0>This option expands the pixels in thevectorization bitmap for colour art.

-rmv_holesl <area (default 7)>

This option removes line art holes smaller
than the specified area.

-rmv_holesc <area (default 7)>

This option removes colour art holes smaller
than the specified area.

-rmv_dirtl <area (default 1)>

This option will remove dirt on the line artthat is smaller than the defined size.
You can set values in the range of 100 to 500.
The size, or area, is in world units squared.

-rmv_dirtc <area (default 1)>

This option removes dirt on the colour art
that is smaller than the defined size.
You can set values in the range of 100 to 500.
The size, or area, is in world units squared.

-margins <inch (default 0.25)>

This option removes the margin aroundbitmap.You must define the size of themargin in inches.

-top_margin <inch (default 0.25)>

This option removes the top margin ofbitmap. You must define the size of themargin in inches.

-bottom_margin <inch (default 0.25)>

This option removes the bottom margin ofbitmap. You must define the size of themargin in inches.

-left_margin <inch (default 0.25)>

This option removes the left margin ofbitmap. You must define the size of themargin in inches.

15

Chapter 3: Utilities Pix2vec Utility

COMMANDACTION-right_margin <inch (default 0.25)>

This option removes the right margin ofbitmap. You must define the size of themargin in inches.

-remove_peg_bars

This option removes the registration marks.

-field_size <fields (default 12 or use value inscan file)>

This option sets the drawing to this field size.

-fsThis is the abbreviated version of -field_size
function.
Use this option to set the drawing field size.

-peg_bar_size <inch (default 1)>

This option sets the size of the peg bar
region.

-noframe

This option prevents a frame being added
around the colour art.

-frame_fields <default -1.000000>

This option will put a frame of the specified
dimension around the colour art.

-downscale_input <default 1> t

This option downscales the raw input by thisinteger factor.

-downscale_texture <default 1>

This option downscales the output texture
by this integer factor.

-buildmatteThis option will automatically generate amatte on the underlay layer for quick line
test.

-buildmatte_colourart

This option will automatically generate amatte on the colour art layer for quick line
test.

-copystrokes

This option will copy the original strokes
when building the matte.
Note that -buildmatte and -buildmatte_colourart are mutually exclusive.

Options for bitmap that have no registration
information-pixel_margins <inch (default 0)>

This option sets the size in inches for thebitmap margin.

-top_pixel_margin <inch (default 0)>

This option sets the size value in inches forthe bitmap top margin.

-bottom_pixel_margin <inch (default 0)>

This option sets the size value in inches forthe bitmap bottom margin.

16

Toon Boom Harmony 10.3 Utilities Guide

COMMANDACTION-left_pixel_margin <inch (default 0)>

This option sets the size value in inches forthe bitmap left margin.

-right_pixel_margin <inch (default 0)>

This option sets the size value in inches forthe bitmap right margin.

-dpi <(default -1)>

This option defines the dpi information of
input bitmap.

RGB KEYING OPTIONS-rgb

Use this option to generate separate zones
for red green and blue lines.

-rgb_alpha <value (default 255)>

Use this option to set an alpha value for red,green and blue colours.

-no_redUse this option to ignore the colour red
during vectorization.

-no_green

Use this option to ignore the colour green
during vectorization.

-no_blue

Use this option to ignore the colour blue
during vectorization.

-flatten

Use this option to perform a flatten on thedrawing after generating the colours.

-rmv_rgb_dirt <threshold area default 0.0>

Use this option to remove red, green andblue regions smaller than the specified area.

-expand_bitmap_rgb <pixels (default 0>This option expands the pixels in thevectorization bitmap for rgb.

-threshrgb <value> <threshold for rgb
vectorization default 0.200000>

This option defines the thresholds on rgb
vectorization and value to consider a pixel tobe gray.

-threshsv <saturation threshold default
0.500000> <value threshold default
0.500000>

This option defines the thresholds onsaturation and value to consider a pixel to begray.

COLOUR VECTORIZATION OPTIONSNote that the following colour vectorization
options are experimental.

-color_vectorize

Use this option to perform a colour
vectorization.

-file2 <color art filename>

This option specifies the colour art bitmap
file to perform vectorization on.

-penstyle <center alpha (0.0-20.0)> <edge

Use this option to generate and set a brush

17

Chapter 3: Utilities Pix2vec Utility

COMMANDACTIONalpha (0.0-20.0)> <gamma (0-10)> <centre
pressure effect (0.0-1.0)> <edge pressure
effect (0.0-1.0)><texture bitmap
downscaling (0.2-20)> <texture bitmap file(valid filename or "" if no file)>

texture for the line art.

-pressure_variation <strategy (0, 1 or 2)><min pressure (0.0-1.0)> <max pressure (0.01.0)> <max variation (0.0-1.0)>

This option specifies a pressure strategy forthe centre line.

-blur_radius <pixels (default 0)>

This option blurs the generated brushtexture.

-color_contour_smooth_passes <times(default 3)>

This option sets the performed number ofsmooth passed on contour before
computing texture.

-ccsp <times (default 3)>

This is the abbreviated version of the -color_
contour_smooth_passes function.
This option sets the performed number ofsmooth passed on contour before
computing texture.

-color_rmv_holesl <world units (default
0.000000)>

This option sets the size of holes to be
removed when computing texture.

-color_fill_holesl <world units (default
0.000000)>

This option will automatically fill holes of theselected size on the colour art layer.

BUBBLE USAGE

To learn more about the Bubble command,refer to the How to Vectorize With Bubbles
section.

(implemented only for colour vectorization'sline art)-create_bubbles

This option modifies the original line art of adrawing by randomly inserting bubble
shapes in it.

-bubble_gap <value (default 3)>

This option defines the maximum number ofcolour art points between two consecutive
bubbles.

-bubble_length <value (default 10)>

This option defines the maximum number ofdifferent radius circles in a single bubble.

-min_radius <value (default 1.5000)>

This option defines the minimum radius of acircle in a bubble relative to the line thickness(must be >= 1.0).

-max_radius <value (default 3.5000)>

This option defines the maximum radius of acircle in a bubble relative to the line thickness(must be >= 1.0).

18

Toon Boom Harmony 10.3 Utilities Guide

COMMANDACTION-uniform_gap

This option specifies that the bubbles shouldbe placed at equal distance from each other.

-uniform_heightThis option forces the height of the bubbles
to be the same for all bubbles.

Vectorization
The options that are used during the vectorization process are based on vectorization styles. You can select apreset from a list, or customize your own.
Some of the commonly used vectorization styles displayed in the Custom Vectorization Parameters, and theImport Drawings dialog boxes, use parameters similar to the following examples:•

Black and White•

Tones/highlights (B+W notriangles)•

Greyscale Rougher Lines•

Greyscale Soft Edge

Black and White
Use this style to vectorize black and white (1-bit) SCAN, or any other black and white files. Black and white 1-bit
files include no texture information.
options: -no_texture -rmv_holes 7 -rmv_dirt 10 -fit_errorl 2.0 -fit_
errorc 2.0
When you vectorize black and white drawings with these options, the vector files will contain no texture (-no_texture); all lines will be solid.
These options also remove holes, (-rmv_holes 7) and dirt, (-rmv_dirt 10) of specific sizes.
The fit_errorl and fit_errorc options also filter the contours that form ink lines and colour art so thatthey are smoother.

19

Chapter 3: Utilities Pix2vec Utility

Tones/highlights (B+W notriangles)

This style vectorizes black and white 1-bit files that will be used as mattes to build tone and highlight effects.
options: -no_texture -rmv_holes 7 -rmv_dirt 10 -fit_errorl 2.0 -fit_
errorc 2.0 -no_break
These options prohibit the creation of line textures, remove holes and dirt, and smooth final drawings. These
options also remove triangles (-no_break) at the intersection of lines in the line art.
Triangles are useful at intersections if the intersecting lines are to be painted using different colours. This is
unnecessary in drawings, like mattes, that will be painted a solid colour.

Greyscale rougher lines
This style vectorizes greyscale drawings, maintaining the rough textures in the lines.
options: -2pass -threshl 0.1 -threshc 0.2 -rmv_holesl 7 -rmv_holesc 7 rmv_dirtl 10 -rmv_dirtc 10 -expand_bitmap 0 -fit_errorc 3.0 -fit_errorl
3.0 -jag_filterc 1 -rmv_hairs 30 3 -rmv_triangles 90
As you can see in the example below, the drawing gets its character from the roughness of its lines. You would
not want to lose the distinctness of the line during the vectorization process.

20

Toon Boom Harmony 10.3 Utilities Guide

The options in this style force two passes of the vectorization process to apply different values to the line art andcolour art (-2pass). You must specify values for the line art and colour art when you use this option.
For drawings with specific vector-style lines or mattes, you only need one pass. For greyscale drawings, you may
want to pass through the vectorization process twice to apply different values to the line art and colour art.
The colour art (-threshc) and line art (-threshl) thresholds determine what values in the scanned image will
be considered as part of the drawing, and what will be ignored and eliminated in the vectorized drawing. Zero(0) is white and one (1) is black. The threshold is between these two values.
The expand_bitmap and jag_filter options work together so that you can pick up noise, or small pencil
lines and marks, during the vectorization process. The expand_bitmap option expands the bitmap to pick up
the noise. When used with jag_filter, the bitmap is shrunk down by the value of the option. You use these
two options together to maintain the size of your line art.
The fit_error options smooth ink lines and colour art strokes.
The rmv_holes and rmv_dirt options remove hair and dirt of a specific size from the line art and colour art.
The rmv_hairs option removes tiny strokes that extend from main colour art strokes. And, rmv_triangles
option removes triangles and intersections that are less than the specified distance apart.

Greyscale soft edge
Use this vectorize style when you want to create a vector image with fine, textured strokes. Unlike the Grayscalerougher lines style, this style is meant for more subtle line variations.
style_name: Grayscale soft edge
options: -2pass -threshl 0.05 -threshc 0.05 -rmv_holesl 7 -rmv_holesc 7-rmv_dirtl 10 -rmv_dirtc 10 -fit_errorl 2.0 -fit_errorc 2.0 -expand_bitmapl 1
Compare these options to the Grayscale rougher lines style. You will notice that the-thresh values are smaller; therefore, fewer pixels will be filtered out.This contributes to the fluffierappearance of the lines. You will also notice that the fit_error value is smaller and the -expand_bitmap
value is larger. All of these options contribute to the smoother appearance of the final line.

How to Vectorize With Bubbles
Vectorizing with bubbles allows the user to modify the original LineArt of a drawing by randomly inserting
bubble shapes.

21

Chapter 3: Utilities Pix2vec Utility

The command inserts bubbles starts from the circle with the smallest radius (min_radius), with the centre on one
colour art point. The command then adds subsequent circles on the remaining colour art points, increasing theirradius each time. The command adds new circles in ascending order of radius until the bubbles reach the
maximum size specified by the max_radius parameter.
The command inserts the first and last circle at the minimum radius (specified by the min_radius parameter) andrandomly assigns the height of the middle circle based on the bubble_length parameter.
For each bubble that appears, the command selects a random number of colour art points to set the distance
between bubbles. The bubble_gap specifies the maximum number of such points, with the minimum being zero.

ExamplesDrawing With Uniform Line Thickness
The initial drawing has a uniform thickness. Use it to view and compare the results of the following bubbles
options.

•

Example 1

22

Toon Boom Harmony 10.3 Utilities Guide

The drawing has been vectorized using the command options:-create_bubbles -bubble_gap 3 -bubble_length 16 -max_radius•

Example 2
The drawing has been vectorized using the command options:-create_bubbles -bubble_gap 3 -bubble_length 4 -max_radius 3.5•

Example 323

Chapter 3: Utilities Pix2vec Utility

The drawing has been vectorized using the command options:-create_bubbles -bubble_gap 3 -bubble_length 16 -max_radius 3.5•

Example 4
The drawing has been vectorized using the options:-create_bubbles -bubble_gap 3 -bubble_length 4 -max_radius 3.0 uniform_gap -uniform_height24

Toon Boom Harmony 10.3 Utilities Guide

Swf2tvg Utility
The Swf2tvg utility is used to import an SWF file into your scene without using the interface. This will create a .tvg
file for each frame. Use the different commands to control the options.
Here is the format you must follow when using Swf2tvg:
Swf2Tvg -palette <palette_file> -usage -help -use_different_palettes-base_name <base_out_name> -outdir <output directory> -bbox_recenter-ignore_position -start_index <number> file1 [file2] [file3]
Here are the available Swf2tvg options:
COMMANDACTIONDESCRIPTION OF SWITCHES-palette <palette_file>

This option is used to add the colours of the SWF file tothe palette file and save it.

-use_different_palettes

This option is used to create a new palette for each
SWF file and DOES NOT save any palette.

-base_name <name>

Use this option to automatically rename all generated
drawings name-x.tvg where x is an increasing index.

-start_index <index>

Use this option to define the starting index to name thedrawings.
The default value is 1.

-outdir <dir>

Use this option to define the output directory for all
generated drawings.

-use_place_objects

This option will transform and position the imported
drawings following the position on the stage in theFlash project. This option uses the information that iscontained in the SWF PLACE_OBJECT record.
Note: this option does not use -start_index.

-frame_alias <list>

This option uses the comma separated list of names togenerate timing information.
This is mainly to convert models.
e.g. -frame_alias FR_%.2d,3Q_%.2d,BK_%.2d"-base_color_index <index>

Use this option to base the colour index in higher 32
bits.

-bbox_recenter

This option centres drawings according to theirbounding box.
This option implies -ignore_position.

25

Chapter 3: Utilities Swf2tvg Utility

COMMANDACTION-ignore_position

Use this option to ignore all sceneplanning information.

-usageThis option will display the usage.

-?|-h|-help|--help

This option will display the help information.

-v|-version|--version

This option will display the version information.

•

If -outdir is not specified, the files will be written in the SWF file current directory.

•

You can specify any SWF file or PLT file. The PLT files will be read and used to match colours
but will not be modified. The only palette modified is the palette specified by the -paletteswitch.

26

Toon Boom Harmony 10.3 Utilities Guide

Swfimport Utility
The Swfimport utility is used to create a template from a SWF file.
Here is the format you must follow when using Swfimport:
SwfImport [options] swf_files
Here are the available Swfimport options:
COMMANDACTIONAVAILABLE OPTIONS-outdir output_folder

This option specifies the output folder for thegenerated templates-applycolourtransform

This option will apply colour transforms from SWF onto
the drawings.

-paletteName name_of_paletteUse this option to specify the name of the palette file touse with colour recovery.

DESCRIPTION OF SWITCHES-outdir dir

This option specifies the output folder for thetemplates (The specified folder must already exist.)-usageThis option will display the usage.

-?|-h|-help|--help

This option will display the help information.

-v|-version|--version

This option will display the version information.

Swfimport does not overwrite templates.

27

Chapter 3: Utilities tvg2xml Utility

tvg2xml Utility
The tvg2xml utility is used for debugging purposes; it will convert your TVG files to an XML file format that you
can read.
Here is the format you must follow when using tvg2xml:
tvg2xml -file <filename (including extension)> [ options ]Here are the available tvg2xml options:

COMMANDACTIONOPTIONS-infile <filename (including
extension)>

Use this option to define the file to perform tvg2xml
on.

-outfile <filename>

This option is used to define an alternate output file.
Use - for output to standard output.

-discretize [optional scale default =0.1]

This option discretizes the Bezier path using scale.
Scale typically range from 0.025 to 4. A larger number
means a higher resolution.
NOTE: Discretize is a process where each pixel of animage is converted into the black foreground or thewhite background. The colours and grays of theoriginal image are lost. By controlling discretizing,
unwanted parts of the original image can be removed.
This process of converting colour images into black
foreground and white background is called
discretizing.

-no_bitmap_data

This option will prevent the output of bitmap data. This
will produce a smaller XML files if the bitmap data is
not needed.

-flattenThis option will perform a flatten on the layers.

-v|-version|--version

This option will display the version information.

-?|-h|-help|--help

This option will display the help information.

28

Toon Boom Harmony 10.3 Utilities Guide

uinfo Utility
The uinfo utility is used to display the following information about a specified bitmap file.
•

Name

•

Resolution•

Format•Channels•

Bites per Channels

Here is the format you must follow when using uinfo:
uinfo program input_files

COMMANDACTIONAVAILABLE OPTIONS-?|-h|-help|--help

This option will display the help information.

-v|-version|--version

This option will display the version information.

29

Chapter 3: Utilities utransform Utility

utransform Utility
The utransform program converts vector images to pixmaps, and between different pixmap file formats. For
example, you can use utransform to convert a TGA to an SGI file. Or, you can convert a TVG file to a Photoshop
PSD file.
Here is the format you must follow when using utransform:$ utransform -file [file name, including extension] [options]
Here are the available utransform options:

COMMANDACTIONOPTIONS-outformat <format>

This is the file type you want to output with utransform.
The following are the file formats supported byutransform: TGA, TGA1, TGA3, TGA4, SGI, SGI1, SGI3,
SGI4, SGIDP3, SGIDP4, OMFJPEG, OPT, OPT1, OPT3,
OPT4, PSD, PSD1, PSD3, PSD4, PSDDP3, PSDDP4,
YUV, PAL, and SCAN.

-outfile <name>

This option is for the file name of the output file.
If you are processing multiple files, you will not be able
to control their final name. If not specified, the files
created by utransform will have the same file name as
the original. The only difference will be the fileextension.

-debugThis option will display information on the different
steps of the process as well as the messages related toerrors that might have occurred.

-?|-h|-help|--help

This option will display the help information.

-v|-version|--version

This option will display the version information.

IMAGE OPTIONS-resolution <w> <h>This option manages vector and pixmap input files. It
indicates the height and width of the output file.

-resolution scanThis option will use the.scan info to determine thedrawing resolution when unvectorizing from theControl Centre.

-scale 


Use this option to scale the height and the width of theoutput file by the value you enter.
The resolution of the image must be able toaccommodate the new image size.

30

Toon Boom Harmony 10.3 Utilities Guide

COMMANDACTION-xscale 


Use this option to scale the width of the output file.
The resolution of the image must be able toaccommodate the new image size.

-yscale 


Use this option to scale the height of the output file.
The resolution of the image must be able toaccommodate the new image size.

-turn <degrees>

Use this option to rotate the output file by the amountof degree entered.

-ps <in> <out>

Use this option to convert the shape of the pixel.
This option inputs and outputs pixel shapes forformats other than YUV and PAL.
The possible values are: square, NTSC and PAL.

-bgcolor <r> <g> <b>This option defines the background colour for TVG
images.
The range is either 0-1 (a percentage of 255) or 0 - 255.
The default value is white.

-bgalpha <a>This is the alpha value of the background.
The range is either 0-1 or 0 - 255. The default value isopaque (255).

VECTOR OPTIONS-antialiasing <quality><exponent>

quality = low, medium-low, medium or high exponent= between 0-3
This option is for converting vector images to pixmaps.
You can specify the quality of the anti-aliasing process(low, medium-low, medium or high) or the exponent(between 0-3).

-nolinetextureThis disables the generation of line textures from TVG
files.

-nolineart

Use this option to exclude line art from the output file.

-nocolorart

Use this option to exclude colour art from output file.

-move <x> <y>Use this option to recentre the output file, output
pixels or world units for TVG output
Note: Useful values for TVG output might be714.285000 in x or 535.713750 in y-flatten

Use this option to flatten the drawing and merge its

31Chapter 3: Utilities utransform Utility

COMMANDACTION
textures.
By default the output file format is TVG.

-bboxtvgincrease

This option will increase the .tvg bonding box size. The
default value is 5 (percent).

-normalize

This option normalizes the TVG. This implies that theoutformat is TVG.
If the TVG has a different scaling than 1, it will scale thecoordinates and set the scaling to 1.0.

-setfieldsize <f>

Use this option to set the internal scaling of the TVG toan exact field size.

VECTOR TO VECTOR OPTIONS-centreline

Use this option to extract the centreline of thedrawing’s line art.

-closegap

Use this option to perform Close gap.

-gaplength

Use this option to define a Close gap length value.
The default value is 10.

-hairpasses

Use this option to set the number of pass to perform
for the remove hair option. The default value is 2.

-hairlength

Use this option to define the value for the hair length.
The default is 20.

-keepcolorart

Use this option to keep the existing colour art andextract the centreline over it.

-showstrokes

Use this option to show the contour of line art andcentrelines in special colours.

-thickness

Use this option to define the thickness in pixels of thestrokes to show.

-fieldsize <fs>

Use this option to set the field size for PDF output.
The default field size is 12.

-lineartstrokescolor <r> <g> <b><a>

Use this option to define the red, green, blue, alphavalues for the line art stroke colour.

-colorartstrokescolor <r> <g><b> <a>Use this option to define the red, green, blue, alphavalues for the colour art stroke colour.

-nofitcolorart

Use this option if you do NOT want to generate Bezier
curves for colour art.

32

Toon Boom Harmony 10.3 Utilities Guide

COMMANDACTION-tvgversion <version>

This option will convert to older/supported vector
format product version:
v720 = 1005
v710 = 1005
v702 = 1004 (Early version of 7.0.2 were using1003.)
v700 = 1003

ALIGNMENT OPTIONS-align <RULE>

Use this option to generate a bitmap that will fit inside
Harmony with a read module aligned with a defined
rule.
RULE can be: AS_IS, CENTER_TB, CENTER_LR,
CENTER_FIRST_PAGE_HORIZONTAL, CENTER_
FIRST_PAGE_VERTICAL, TOP, BOTTOM, LEFT,RIGHT.

-dpi <dpi>

Use this option to define the output resolution for thebitmap image in dots per inch.
The default resolution is 75 dpi.

-sar <scene_aspect_ratio>

This option sets the scene aspect ratio, the default is
1.33333. Use 1.7777777 for 16/9 scenes. The scene
aspect ratio can be read from the scene alignment
dialog. Beware, that this is not the ratio of the scene
resolution.

33

Toon Boom Harmony 10.3 Utilities Guide

34