This question already has answers here:
WPF Image to byte[]
(7 answers)
Closed 2 years ago.
in my application i am taking snapshot from live video which i then assign to ImageSource, Now i want to Convert ImageSource to Byte[]
private ImageSource mSnapshotTaken;
public ImageSource SnapshotTaken
{
get => mSnapshotTaken;
set
{
if (value == null)
{
}
else
{
mSnapshotTaken = value;
// SnapshotToByte = mSnapshotTaken
OnPropertyChanged("SnapshotTaken");
}
}
}
public byte[] SnapshotToByte { get; set; }