PVRTexTool Command Line Options

OptionDescriptionUsageExample
Help

Provides a list of all available CLI options.

Help can also be used to output additional information about a specific option.

-help

-help <option>

-help

-help f

Input file[REQUIRED] Sets the input file or files. Must be a JPEG, PNG,BMP, TGA, HDR, GIF, PSD, PPM, PGM, PIC, PVR, KTX, KTX2, DDS, ASTC file, or BASIS container file. If either the cube map or texture array flag is set, multiple files should be explicitly specified.-i [filepath],<otherfiles...>-i image.jpg, image2.png
Input colour spaceExplicitly set the colour space for all input files.

Valid colour spaces:

  • lRGB
  • sRGB
-ics [colourspace]-ics lRGB
No OutputSuppress the output of a .pvr file-noout-noout
Output fileSets the output file destination. If specified, must be a PVR, KTX, KTX2, H, or DDS file. Otherwise the application outputs a file with the same name as the first input file.-o <filepath>-o texture.pvr
Decompress output

If set, saves a decompressed file alongside the input. A file name can be specified as JPEG, PNG, BMP, TGA or HDR. If the file name is unspecified, the file is decompressed to a file with the same name as the first input file (the default decompressed file type is PNG). For cube maps and texture arrays, the behaviour is different. A series of decompressed files is output in the following format:

<Name>.Face<FaceNumber>.Array<ArrayNumber>.<Extension>.

For example: Texture.Face1.Array12.png

-d <filepath>-d decompressed.png
Cube mapConstructs a cube map from available input files. The input file argument must contain at least six textures or a multiple of six textures if the array flag is present. Textures of different sizes are resized with a linear filter to the size of the original texture, or the specified size if resizing.-cube <faceorder>-cube +X,-X,+Y,-Y,+Z,-Z
Equi to Cube mapConstructs a cube map from a single equirectangular image, the input file must have an aspect ratio of 2:1. By default this operation uses a linear filter; optionally supply 'nearest', 'linear' or 'cubic' to override.-equi2cube <filter>-equi2cube cubic
Texture arrayConstructs a texture array from available input files. The input file argument should contain multiple files or a multiple of six textures if the cube map flag is enabled.-array-array
ResizeResizes a texture to the given size represented by two unsigned integer parameters for width and height. Values up to 8096x8096 are supported. This option is incompatible with square or power of two resize options.-r [width],[height]-r 512,256
Resize squareForces the texture into a square. A single character parameter, - or +, can be specified to indicate if it should be resized smaller or larger. Incompatible with standard resize.-square <+|->-square +
Resize power of twoForces the texture into power of two dimensions. A single character parameter, - or +, can be specified to indicate if it should be resized smaller or larger. Incompatible with standard resize.-pot <+|->-pot +
Resize filterBy default, a linear filter is used to resize textures. Setting this flag to nearest, linear or cubic forces PVRTexTool to use the specified filter to resize textures.-rfilter [nearest|linear|cubic]-rfilter cubic
RotateRotate the texture around a given axis x, y or z. Currently only z is supported; this is a standard 2D rotate. Also requires a second argument - or + to choose the rotate direction. In the context of a 2D rotation + is clockwise and - is anti-clockwise.-rotate [z],<+|->-rotate z,+
FlipFlips the texture over a given axis x, y, or z. Currently only x and y are supported providing a standard 2D flip. Also accepts an optional second argument (flag) that adds metadata to the texture marking it as being flipped. This is useful when knowledge of the orientation is required ahead of time, for example, if displaying a flipped texture in its original orientation.-flip [x|y],<"flag">-flip y,flag
Add borderAdds a mirrored border to the texture. If no arguments are specified, PVRTexTool chooses an appropriate border size for the texture. Alternatively, border sizes can be chosen manually for the width and height. Specifying only the width is allowed, and results in the vertical border having a height of zero.-b <width>,<height>-b 4,4
Pre-multiply alphaPre-multiplies the texture by its alpha value.-p-p
Alpha bleedDiscards any data in fully transparent areas to optimise the texture for better compression.-l-l
Normal map generationUses the input texture as a height map to generate a normal map by creating an intensity texture from the r, g and b channels. Accepts two arguments: a positive float which determines the scale that the height map is assumed to be on, and a string of a combination of the four characters x, y, z and h. These specify the channel order as saved out into the texture. x, y and z specify these components, and h specifies the original height value used. Duplicate channels are not allowed, but channels can be missed off. This argument is optional, and the default is xyz.-n [scale],<channelorder>-n 1.0,xyzh
Mipmap generationGenerates MIP maps for the current texture. An optional unsigned integer can be added to specify the number of MIP map levels which should be generated, otherwise a full chain is created.-m <numberofmipmaps>-m 9
MIP map filterSpecifies the filter used to generate MIP maps: nearest, linear, or cubic. If not specified, a linear filter is used.-mfilter [nearest|linear|cubic]-mfilter cubic
Colour MIP mapsSaturates the tail of the MIP map chain with colours for debugging purposes. If the original colour of a texture cannot be seen, then it is assumed to be using MIP maps at all times, and some upper levels can be removed from the texture to reduce memory consumption.-c-c
Encode format

Sets the encoding format. The first argument is the format, which is required. This can be either a compressed format or a non-compressed format in the form r8g8b8a8. Up to four channels may be specified but must be matched with a size (in bits) at all times. Valid channel names are r, g, b, a, i, l or x. Valid channel sizes range from 1 to 32 (bits), but the total bits per pixel must be a multiple of eight (byte aligned). The second argument is the channel type, which is optional for compressed formats. If not specified, this defaults to normalised unsigned byte. It is required for uncompressed formats.

The third argument specifies the colour space, which accepts either sRGB or lRGB. The default is lRGB for linear RGB.

If an encoding format is not specified then the texture format of the first input will be used.

Valid compressed formats:

  • ASTC_4X4, ASTC_5X4, ASTC_5X5, ASTC_6X5, ASTC_6X6, ASTC_8X5, ASTC_8X6, ASTC_8X8
  • ASTC_10X5, ASTC_10X6, ASTC_10X8, ASTC_10X10, ASTC_12X10, ASTC_12X12
  • ASTC_3X3X3, ASTC_4X3X3, ASTC_4X4X3, ASTC_4X4X4, ASTC_5X4X4, ASTC_5X5X4, ASTC_5X5X5, ASTC_6X5X5, ASTC_6X6X5, ASTC_6X6X6
  • BASISU_ETC1S, BASISU_UASTC
  • BC1, BC2, BC3, BC4, BC5
  • BW1BPP
  • DXT2, DXT4
  • EAC_R11, EAC_RG11
  • ETC1, ETC2_RGB, ETC2_RGBA, ETC2_RGB_A1
  • GRGB8888
  • PVRTCI_HDR_6BPP, PVRTCI_HDR_8BPP, PVRTCI_2BPP_RGB, PVRTCI_2BPP_RGBA, PVRTCI_4BPP_RGB, PVRTCI_4BPP_RGBA
  • PVRTCII_2BPP, PVRTCII_4BPP, PVRTCII_HDR_6BPP, PVRTCII_HDR_8BPP
  • RGBD
  • RGBG8888
  • RGBM
  • SHAREDEXPONENTR9G9B9E5
  • UYV10A2_444
  • UYVA16_444
  • UYVY10LSB_422, UYVY12LSB_422
  • UYVY10MSB_422, UYVY12MSB_422
  • UYVY16_422, UYVY_422
  • VYUA10LSB_444, VYUA12LSB_444
  • VYUA10MSB_444, VYUA12MSB_444
  • YUV10LSB_2P_420, YUV10LSB_3P_420, YUV12LSB_2P_420, YUV12LSB_3P_420
  • YUV10LSB_2P_422, YUV10LSB_3P_422, YUV12LSB_2P_422, YUV12LSB_3P_422
  • YUV10LSB_2P_444, YUV10LSB_3P_444, YUV12LSB_3P_444
  • YUV10MSB_2P_420, YUV10MSB_3P_420, YUV12MSB_2P_420, YUV12MSB_3P_420
  • YUV10MSB_2P_422, YUV10MSB_3P_422, YUV12MSB_2P_422, YUV12MSB_3P_422
  • YUV10MSB_2P_444, YUV10MSB_3P_444, YUV12MSB_3P_444
  • YUV16_2P_420, YUV16_2P_422, YUV16_3P_420, YUV16_3P_422, YUV16_3P_444
  • YUV_2P_420, YUV_2P_422, YUV_2P_444, YUV_3P_420, YUV_3P_422, YUV_3P_444
  • YUY2_422
  • YUYV10LSB_422, YUYV12LSB_422
  • YUYV10MSB_422, YUYV12MSB_422
  • YUYV16_422
  • YVU10LSB_2P_420, YVU10LSB_2P_422, YVU10LSB_2P_444
  • YVU10MSB_2P_420, YVU10MSB_2P_422, YVU10MSB_2P_444
  • YVU_2P_420, YVU_2P_422, YVU_2P_444, YVU_3P_420

Valid variable types:

  • UB
  • UBN
  • SB
  • SBN
  • US
  • USN
  • SS
  • SSN
  • UI
  • UIN
  • SI
  • SIN
  • UF
  • SF

Key:

  • First char:
    • S=Signed,
    • U=Unsigned
  • Second char:
    • B=Byte,
    • S=Short,
    • I=Integer,
    • F=Float
  • Third Char (optional):
    • N=Normalised

Valid colour spaces:

  • lRGB
  • sRGB
  • bt601
  • bt709
  • bt2020
-f [format],<vartype>,colourspace>-f PVRTC1_2,UBN,lRGB
Encode qualitySets the level of compression quality used for PVRTC, ETC, ASTC and BASISU formats.Valid quality modes:
  • pvrtcfastest,
  • pvrtcfast,
  • pvrtclow,
  • pvrtcnormal,
  • pvrtchigh,
  • pvrtcveryhigh,
  • pvrtcthorough,
  • pvrtcbest,
  • etcfast,
  • etcnormal,
  • etcslow,
  • astcveryfast,
  • astcfast,
  • astcmedium,
  • astcthorough,
  • astcexhaustive,
  • basisulowest,
  • basisulow,
  • basisunormal,
  • basisuhigh,
  • basisubest
-q [compressorquality]-q pvrtcfast
DitherIf set, tells the compressor to dither the texture before compression to avoid banding artefacts.-dither-dither
Max RangeSets the maximum range (min 1.0) to use when encoding to RGBM and RGBD texture formats. A higher value will allow for a higher dynamic range at the expense of accuracy which may lead to artefacts such as banding. This value will also be inserted into the PVR meta data.-maxrange [value]-maxrange 8.0
Diffuse IrradianceGenerate a Mip mapped diffuse irradiance texture from a cube-map environment texture, to be used primarily with physically based rendering (PBR) techniques. First (required) argument is the number of samples to use when generating the environment map. Second (required) argument is the output dimensions, in pixels. The default channel type for this texture is 32 bit floating point.-ibldiffuse [samples],[dimensions]-ibldiffuse 200,64
Pre-filtered SpecularGenerates a Mip mapped pre-filtered specular irradiance texture from a cube-map environment texture, to be used primarily with physically based rendering (PBR) techniques. Each Mip level of the specular map is blurred by a roughness value between 0 and 1. First (required) argument is the number of samples to use when generating the environment map. Second (required) argument is the output dimensions, in pixels. Third (optional) argument is the number of Mip levels to be discarded from the bottom of the Mip chain. The default channel type for this texture is 32 bit floating point.-iblspecular [samples],[dimensions],<levels to discard>-iblspecular 400,512,2
Include Roughness ZeroInclude a roughness of zero when generating the pre-filtered specular environment map. By default roughness zero will not be included in the pre-filtered specular texture; in this case the user should supply roughness zero from the source environment texture.-irz-irz
Red/Green/Blue/Alpha channelSets the red channel in the input texture to match the channel specified in a second image. A file name is specified for the source, and an optional channel name (single character) can be specified to select the source. By default, the channel draws from its equivalent in the new texture. For example, red draws from red, green from green, and so on. Valid source channels are r, g, b, a, l, i. These represent red, green, blue, alpha, luminance and intensity.-[channeltype] [filename],<channelname>

-red Red.png,g -green Green.dds,b

-blue Blue.pvr,r

-alpha Alpha.bmp,i

DifferenceCalculates the difference between the input and a supplied file, providing error metrics, and is incompatible with performing compression (-f). A visual representation of the differences can be output by selecting an output mode: - Colour - outputs the absolute delta of each channel into a texture. The modifier multiplies the deltas to highlight any issues (default: 1.0).
  • Colour - outputs the absolute delta of each channel into a texture. The modifier multiplies the deltas to highlight any issues (default: 1.0).
  • Tolerance - diffs using the modifier as threshold (default: 0.1). Deltas of zero are black, above the threshold are red, below are blue.
  • Blend - blends the images using the modifier as a weighting of the first texture against the second (default: 0.5).
  • None (default) - suppresses output, so only metrics are provided.
-diff [filename],<mode>,<modifier>-diff Other.png,Blend,0.5f
Resize canvasResizes a texture to the given size, without changing the image data. This takes effect after resizing. Accepts two unsigned integer parameters for width and height. Values up to 8192x8192 are supported. Option is incompatible with square or power of two canvas resize options.-rcanvas [width],[height]-rcanvas 512,256
Resize canvas squareForces the texture into a square, without changing the image data. This takes effect after resizing. A single character parameter, - or +, can be specified to indicate whether to resize smaller (-) or larger (+). Incompatible with standard resize.-squarecanvas <+|->-squarecanvas +
Resize canvas power of twoForces the texture into power of two dimensions, without changing the image data. This takes effect after resizing. A single character parameter, - or +, can be specified to indicate whether to resize smaller (-) or larger (+). Incompatible with standard resize.-potcanvas <+|->-potcanvas +
Offset canvasSets the offset when performing a canvas resize, including square or pot resizes. Accepts two signed integer parameters for xoffset and yoffset. Values between -8192 x -8192 and 8192 x 8192 are supported. Incompatible with centre canvas.-offsetcanvas [xoffset],[yoffset]-offsetcanvas -12,56
Centre canvasSets the offset when performing a canvas resize (including square or power of two resizes) so that the image resides in the centre of the canvas. Incompatible with canvas offset.-centrecanvas-centrecanvas
Number of JobsSets the maximum number of threads to use for transcoding. All available cores are used by default-j-j 8