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; }
Try this:
You can take other encoder as well.
REFERENCE: this & this