- WebClient^ client = gcnew WebClient;
- Stream^ stream = client->OpenRead(imgUrl);
- Bitmap^ image1 = gcnew Bitmap( stream );
- stream->Close();
- String^ savePath = "D:\\img\\" + "imgFileName" + "gif";
- image1->Save(savePath, System::Drawing::Imaging::ImageFormat::Gif);
直接保存
- String^ remoteUri = imgUrl;
- String^ fileName = "D:\\img\\Button3.gif", ^myStringWebResource = nullptr;
- WebClient^ myWebClient = gcnew WebClient;
- //myStringWebResource = String::Concat( remoteUri, fileName );
- myWebClient->DownloadFile( remoteUri, fileName );
0 件のコメント:
コメントを投稿