A data source or transformation creates binary data by populating a DataValueCursor.
// Create a memory stream to use when converting the image to png.
using (MemoryStream ms = new MemoryStream())
{
// Convert image to png.
image.Save(ms, ImageFormat.Png);
// Reset memory stream to get ready to read binary values.
ms.Position = 0;
// Create the BinaryLargeObject from the memory stream and set the binary value.
binaryCursor.MutableDataValue.Value = BinaryLargeObject.Create(ms);
binaryCursor.MutableDataValue.IsValid = true;
}