vpenades / SharpGLTF

glTF reader and writer for .NET Standard
MIT License
454 stars 72 forks source link

Satellite image file name incorrect when the gltf file contains extra dot #217

Closed mzh3511 closed 2 months ago

mzh3511 commented 5 months ago

Given a gltf file name: Building 1_Prediction_WiFi 802.11n - 2.4GHz - 20MHz_RSSI by floor.gltf, the gltf only has one image, Expected image file name: Building 1_Prediction_WiFi 802.11n - 2.4GHz - 20MHz_RSSI by floor.png Actual: Building 1_Prediction_WiFi 802.11n - 2.png

The reason: when write the json by WriteTextSchema2 method, the baseName does not include the extension image

In Image._WriteToSatellite, when calling System.IO.Path.ChangeExtension method by a FileNameWithoutExtension, it will use the last dot symbol as the Separator between the FileNameWithoutExtension and Extension image

vpenades commented 4 months ago

will look into it...