--preset-file command line parameter is not read correctly

Preset contains BC3/DXT5, when preset is called from command line to convert a raw image, converted image has BC7 format. I can’t upload the .pwf here but you can see the preset loaded in the image and the format of the converted image loaded up.

Expected Behaviour
The preset param works correctly

Command Used
“nvtt_export.exe” --preset-file “Medieval2.dpf” -o “.\converted\khamul.tga.dds” “.\raw\khamul.tga”

Things I’ve Tried

  • Updating to latest version
  • Calling in different order
  • Calling an incorrect preset name (Errors out with no logging)

Hi @steadyeddie101, thanks for reporting this issue! I’ve just confirmed that this happens – looks like it’s an issue where the BC7 default was re-applied after the command-line parser handled the --preset option.

I’ve submitted a fix for this bug, so it’ll be fixed in the next version – I’ll update this thread when it’s released! Looks like it wasn’t a regression – the buggy code dates back to the introduction of the preset feature. The workaround is to add --format bc3 at the top level in addition to the --preset call, like this:

nvtt_export --preset Medieval2.dpf -f bc3 ...

but of course it’s better to have a fix for this.

Hope this helps!