Вопрос по jpeg, c# – C # Загрузить файл JPG, распаковать BitmapImage

12

Error: User Rate Limit Exceeded

FileStream fIn = new FileStream(sourceFileName, FileMode.Open); // source JPG
Bitmap dImg = new Bitmap(fIn);
MemoryStream ms = new MemoryStream();
dImg.Save(ms, ImageFormat.Jpeg);
image = new BitmapImage();
image.BeginInit();
image.StreamSource = new MemoryStream(ms.ToArray());
image.EndInit();
ms.Close();

Error: User Rate Limit Exceeded

Ваш Ответ

1   ответ
22

Error: User Rate Limit Exceeded

public void Load(string fileName) 
{

    using(Stream BitmapStream = System.IO.File.Open(fileName,System.IO.FileMode.Open ))
    {
         Image img = Image.FromStream(BitmapStream);

         mBitmap=new Bitmap(img);
         //...do whatever
    }
}

Error: User Rate Limit ExceededError: User Rate Limit Exceeded):

Bitmap myBmp = Bitmap.FromFile("path here");
Error: User Rate Limit Exceeded IamIC
Error: User Rate Limit Exceeded IamIC
Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded

Похожие вопросы