compressonator icon indicating copy to clipboard operation
compressonator copied to clipboard

Support UNC paths on Windows

Open lukts30 opened this issue 4 years ago • 2 comments

Reading from UNC seems to be working. But writing does not.

Expected behavior: commands should be equivalent.

PS C:\> CompressonatorCLI "\\?\C:\Users\lukas\Documents\rdm4\rdm4lib\rdm\excavator_tycoons_diff_0.dds" "C:\Users\lukas\Documents\rdm4\rdm4lib\gltf_out1\excavator_tycoons_diff_0.png"
Processing progress = 75   MipLevel  7 FaceOrSlice  0
Done Processing
PS C:\> CompressonatorCLI "\\?\C:\Users\lukas\Documents\rdm4\rdm4lib\rdm\excavator_tycoons_diff_0.dds" "\\?\C:\Users\lukas\Documents\rdm4\rdm4lib\gltf_out1\excavator_tycoons_diff_0.png"
Processing progress = 75   MipLevel  7 FaceOrSlice  0
Error: saving image failed, write permission denied or format is unsupported for the file extension.

Actual behavior: using an UNC path as destination fails.

lukts30 avatar Sep 10 '20 15:09 lukts30

@lukts30 This needs to be investigated further for UNC IO support. Its good that read works with CMP DDS lib API, for saving to png files we use Qt lib's qimage->save(). Will have to investigate if UNC is supported by that API.

NPCompress avatar Sep 10 '20 18:09 NPCompress

On Ubuntu (WSL 2):

Path to compressonatorcli-bin in $PATH

compressonatorcli-bin "/mnt/d/images/dds/voice_icon.dds" "/mnt/d/images/png/voice_icon.png"

Processing source : /mnt/d/images/dds/voice_icon.dds Processing destination: /mnt/d/images/png/voice_icon.png Processing progress = 95MipLevel 1 FaceOrSlice 1 Error: saving image failed, write permission denied or format is unsupported for the file extension.

compressonatorcli-bin -ff DDS -fx PNG "/mnt/d/images/dds/DIALOG/" "/mnt/d/images/png/DIALOG"

Processing source : /mnt/d/images/dds/DIALOG/dialog_BG.dds Processing destination: /mnt/d/images/png/DIALOG/dialog_BG.png Processing progress = 100MipLevel 1 FaceOrSlice 1 Error: saving image failed, write permission denied or format is unsupported for the file extension.

Dimoks avatar Feb 04 '24 09:02 Dimoks