public static byte[] ToByteArray(this BitmapSource source, string fileExtension)
 {
     return(source.ToByteArray(MediaHelper.GetBitmapEncoder(fileExtension)));
 }