Setting PNG image metadata doesn't work
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
Code example doesn't work. TrySave method is called before the changes in metadata.
If we add saving after the changes, the TrySave method returns false.

---
#### Document Details
⚠ *Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.*
* ID: 476ff378-df63-0a54-8a1b-4b8c9dc54c67
* Version Independent ID: f8e5a0e6-da8f-ccab-8dec-7d7cbe00c497
* Content: [How to: Write Metadata to a Bitmap - WPF .NET Framework](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/graphics-multimedia/how-to-write-metadata-to-a-bitmap?view=netframeworkdesktop-4.8)
* Content Source: [dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-write-metadata-to-a-bitmap.md](https://github.com/dotnet/docs-desktop/blob/main/dotnet-desktop-guide/framework/wpf/graphics-multimedia/how-to-write-metadata-to-a-bitmap.md)
* Product: **dotnet-framework**
* Technology: **dotnet-wpf**
* GitHub Login: @adegeo
* Microsoft Alias: **adegeo**
Contributor guide
Assessment
This issue has not been assessed yet.