Embeds this metadata into an existing JPEG.
Syntax

[C#]

byte[] Embed(byte[] data);
string Embed(string path);

[Visual Basic]

Function Embed(data As Byte()) As Byte()
Function Embed(path As String) As String
Params
Name Description
data The byte data of an existing JPEG.
path A path to the existing JPEG.
return The updated JPEG data.
Notes

None.

Example

[C#]

string file = Server.MapPath("IG8_Metadata_Embed.jpg", true);
File.Copy(Server.MapPath("rez/iptc.jpg"), file);
Metadata metadata = new Metadata(file);
metadata.Iptc.Add("Headline", true).Text = "Oxford University Ball";
metadata.Iptc.Add("Caption", true).Text = "What a laugh!";
metadata.Iptc.Embed(file);


The code reads the IPTC information from a JPEG file. It then changes the headline and caption and embeds the changed information into the original file.