ฉันกำลังพยายามบันทึกคุณสมบัติบางอย่างลงในไฟล์รูปภาพในแอปพลิเคชัน Windows 10 UWP บนโทรศัพท์มือถือ
var fileProperties = await file.Properties.GetImagePropertiesAsync();
fileProperties.Rating = 25;
fileProperties.Title = "Title";
fileProperties.DateTaken = DateTime.Now;
await file.Properties.SavePropertiesAsync();
ด้วยเหตุผลบางประการ คุณสมบัติจะไม่ถูกบันทึก
ไฟล์จะถูกสร้างขึ้นล่วงหน้าดังนี้:
var file = await _sourceFolder.CreateFileAsync(pathToFile, CreationCollisionOption.ReplaceExisting);
await bitmap.SaveToStorageFile(file);
โดยที่บิตแมปเป็นประเภท WriteableBitmap รูปภาพถูกบันทึกลงในไฟล์ แต่คุณสมบัติไม่ได้เป็นเช่นนั้น
ไม่มีใครรู้ว่าสิ่งที่ฉันทำไม่ถูกต้อง? ไม่มีข้อยกเว้น ไม่มีข้อความว่าทำไมจึงไม่สำเร็จ