// Grab copy of BitmapMetadata and add Padding BitmapMetadata bitmapMetadata = this.ReadMetadata("TestInput.jpg"); StandaloneWpfReader.AddMetadataPadding(bitmapMetadata, 5012); // Use SetQuery to store the IPTC Address fields bitmapMetadata.SetQuery(iptcCity, "IPTC City"); bitmapMetadata.SetQuery(iptcCountry, "IPTC Country"); bitmapMetadata.SetQuery(iptcRegion, "IPTC Region"); bitmapMetadata.SetQuery(iptcSubLocation, "IPTC SubLocation"); // Save the new file this.WriteMetadata("TestInput.jpg", "TestOutput.jpg", bitmapMetadata); |