Usage

The GFxExport tool is prebuilt for Win32 and located in the bin directory in your SDK. A typical path would be:

C:\Program Files\Autodesk\Scaleform\GFx SDK 4.6\Bin\gfxexport.exe

GFxExport is used in the following way:

gfxexport [file.swf] [file(s)...] [options] 

For the filenames, wildcards are supported, such as *.swf.

To see the full list of command line options and usage instructions, execute gfxexport.exe without any additional arguments and help output will be printed.

Image Options

Images can be converted to DDS files with DXT texture compression for optimized loading and run-time memory savings. The ability to use external DDS files is the one of the most important advantages of GFx files over SWF files.

-i <format>

Specifies output format for exporting image data where is one of the following:

-strip_images

Just strip images, do not write them to files.

-share_images

Tries to reuse images in the destination directory rather than write new ones every time. This option is not supported for images generated by external plugins/tools.

–replace_images

Replace internal (embedded in SWF) images with external files based on the image linkage ID. For example, if image has linkage ID “myimage.png”, it will be replaced with the image in myimage.png file. When used with -pack option, only images excluded from packing will be replaced. You can exclude image from packing by adding “_nopack” or “.nopack” to image Linkage ID/Class name.

-id

Specifies the directory for the external images.

-rescale <nearest | hi | low | nextlow | mult4> [filter]

Optional filtering for rescaling (must follow mandatory rescale mode option): * Box * Triangle * Quadratic * Cubic * Catrom * Mitchell * Gaussian * Sinc * Bessel * Hanning * Hamming * Blackman * Kaiser

-sq Force -rescale and -pack options to produce square images.

-pack (Scaleform 3.1 and above)

Pack images into larger textures.

-packsize<size> (Scaleform 3.1 and above)

Set the maximum size for packed textures. Default value is 1024.

-ptresize<no | p2 | mult4 | mult128 > (Scaleform 3.1 and above)

Resize the packed textures. Used with the following options:

-pad

Pad textures to power of 2 or multiple of 4 (set by ptresize). This option is the alias for -pack -packsize 2. Note: To exclude images from packed texture, add “_nopack” or “.nopack” to Linkage identifier of the image in the Flash Studio.

-d0

Write uncompressed DDS

-d1c

Use DXT1 for RGB data without alpha channel.

-d1a

Use DXT1 for RGB data with alpha channel.

-d3/-d5

Use DXT3 (default) or DXT5 for RGB data with alpha channel.

-qf, -quick

Fast compression method.

-qn, -quality_normal

Normal quality compression (default).

-qp, -quality_production

Production quality compression.

-qh, -quality_highest

Highest quality compression (this can be very slow).

Note that starting from Scaleform 3.2, options for mipmaps has been changed. Mipmaps are not generated by default (except for font textures).

-mipmap

Generate mipmap levels in DDS file (by default, mipmaps are generated only for fonts).

-mipfilter < Box | Triangle | Kaiser>

Select mipmap filter (Box is default).

-fnomipmaps

Do not generate mipmaps for fonts.

-pv2 Use 2 bit per pixel compression.

-pv4 Use 4 bit per pixel compression.

Note that these options are available only for supported mobile and handheld platforms.

Platform options

Instead of choosing specific image format, you can choose target platform and GFxExport will select the appropriate format. However some of the platform options require dll plugin (comes with Scaleform SDK for the platform) and appropriate platform SDK tools. Some of the platform-specific images will be stored in SIF (Scaleform Image Format) container.

-platform <3ds | iphone | vita | wiiu | x360 | android | ps3>

-pu This option will affect only ps3 and x360 option and will produce platform specific uncompressed images.

-d <dirname> Set the destination directory for exported data files. If not specified, files are stored in the directory containing the SWF.

-sd Create subdirectories for each SWF file using the SWF filename. Extracted files are placed in the corresponding subdirectories.

-c Write compressed stripped .gfx file(s). In practice many developers compress multiple files generated by gfxexport within their own package system, using custom GFx::FileOpener to load them as necessary.

-o Specify the directory to write .gfx files.

-p <prefix> Specifies prefix to add to the name of each exported resource. By default, the original SWF filename is used as prefix.

-lwr / -upr Force all exported files to have lowercase / uppercase names.

-ne Tell gfxexport not to use export names when image file names are being formed.

-modstamp Do not run if SWF file is older that existing gfx.

Font Options

GFxExport can be used to compress font vector data more efficiently and to reduce memory usage. It can also be used to pre-generate font textures, although this is not recommended except for low-end systems. Please refer to our Font Configuration Overview document for more information about the Scaleform font system.

-fonts Export font textures. If not specified, font textures will not be generated (allowing for either dynamic cache or packing at load time to be done instead).

-fntlst Export font list and textfield/font map (.fnt-file).

-fc
Use compact fonts

-fcl <size> Set the normalized size of compact fonts (default size is 256).

-fcm Merge edges for compact fonts.

-fns <size> Set the nominal size of texture glyph in pixels (defaults to 48 if no size is specified). The nominal size is the maximum size of one glyph in a texture. Smaller characters are rendered at runtime by using tri-linear mip-map filtering.

-fontmap Export a list of textfield that starts with “$” and corresponding fonts. This list can be used for creating font maps.

-fpp <n> Specifies the space, in pixels, to leave around the individual glyph image. The default value is 3.

-fts <WxH> Set the dimensions of the textures that the glyphs get packed into. Default size is 256x256. To specify a square texture, only one dimension can be specified, e.g.: '-fts 128' is 128x128. '-fts 512x128' specifies rectangle texture.

-fs Force separate textures for each font. By default, fonts share textures.

-strip_font_shapes Do not write font shapes in resulting GFX file.

-fi <format> Specifies output format for font textures, where is one of the following:

TGA8 - 8-bit Targa TrueVision (grayscale) TGA24 - 24-bit Targa TrueVision (grayscale) TGA32 - 32-bit Targa TrueVision DDS8 - 8-bit DDS A8 By default, if image format (-i option) is TGA then TGA8 is used for font textures; otherwise DDS A8 is used.

Please note, that -fns, -fpp, -fts, -fs, -fi should be used only with -fonts option

Info Options

-q

Quiet mode (suppress output).

-x

Quiet progress mode (suppress progress output).

-list

Save list of generated files.

-info

Get information about exported images, but do not export them.

TextField Options

-det

Export list of unique default values of dynamic/input textfields to the text file with .det extensions. Text file will be saved in UTF-8 encoding. Default text field values may be useful for localization.

-ddt

The same as -det option except it does not save values of input textfields. The output files will have .ddt extension.

Fscommand Options

-fstree

Export list of fscommands as a tree (.fst-file)

-fslist

Export list of fsommands as a sorted list (.fsl-file)

-fsparams

Save parameters of fscommands. This option works with -fstree and -fslist options and will save parameters of fscommands to .fst or .fsl file. However it will work only for hardcoded parameters.

Sound Options

-s <extension>

Specifies the extension for exporting sound files.