Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Как скачать картинку с помощью xNet? #37

Open
skvoshiz opened this issue Mar 18, 2016 · 3 comments
Open

Как скачать картинку с помощью xNet? #37

skvoshiz opened this issue Mar 18, 2016 · 3 comments

Comments

@skvoshiz
Copy link

Здравствуй, спасибо за твою библиотеку xNet, очень помогает уже больше года. Есть ли в ней метод, либо как скачать картинку и чтоб она сохранилась в байтах?
https://m.vk.com/captcha.php?sid=1111
Нужно вот эту картинку скачать, подскажи пожалуйста=)

@c3ffee
Copy link
Contributor

c3ffee commented Mar 20, 2016

var bytes = request.Get("https://m.vk.com/captcha.php?sid=1111").ToBytes();
File.WriteAllBytes("image.jpeg", bytes");

@Radzhab
Copy link

Radzhab commented Apr 8, 2016

А зачем в ToBytes? Не проще ToFile ?))

@Smarturtle23
Copy link

Smarturtle23 commented Aug 25, 2016

Or you can do this:
`Image img = null;

img = Image.FromStream(request.Get("https://m.vk.com/captcha.php?sid=1111").ToMemoryStream());`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants