Hi,
Can any one tell me how to convert type 'System.Drawing.Image' to 'System.Windows.Media.ImageSource' in WPF Application
My one line code is :-
image.Source = b.Encode(types, this.txtId.Text.Trim(), W, H);
Where Encode function is Like :-
public System.Drawing.Image Encode(TYPE iType, string StringToEncode, int Width, int Height);
And got an error i.e :-
Cannot implicitly convert type 'System.Drawing.Image' to 'System.Windows.Media.ImageSource'
Can you tell me how to convert type 'System.Drawing.Image' to 'System.Windows.Media.ImageSource', I btw added the reference of System.Drawing in my wpf application.
Thanks In Advance