Examples for using GenerateProfileImageBitmap or GenerateProfileImageStream

Mar 16, 2015 at 7:18 PM
I'm trying to get the profile picture of the incoming tweet. I noticed that the above methods were added. Does anyone of examples on how to use them? I'm having a hard time finding GenerateProfileImageBitmap in the object explorer.

Mar 17, 2015 at 10:30 AM
I agree that this is not obvious. I wonder why I decided not to add this function into the IUser interface.

Anyway here is the code that you want:
var user = User.GetUserFromScreenName("I_AM_THE_SCREEN_NAME");
var imageStream = User.GetProfileImageStream(user, ImageSize.normal);
Marked as answer by linvi on 3/17/2015 at 11:07 AM
Mar 17, 2015 at 5:59 PM
Thanks! I found it and got it working. Appreciate the reply though. Do you have an example for GenerateProfileImageBitmap? I'm assuming that this will take the stream and write it to memory? Currently I'm this doing this myself so I don't need it at the moment. But it might be a nice feature to add, IMHO. Thanks for the great work!
Mar 17, 2015 at 7:10 PM
Edited Mar 17, 2015 at 7:16 PM

This feature existed before in Tweetinvi but I can no longer provide it.

The reason is that Tweetinvi is a Portable Class Library that works on Windows Phone, Windows 8, Mono, Xamarin Android, Xamaring IOs, Windows RT...
And depending on the platform the logic is different.

Furthermore the code is not really complicated ;)