trevor1940
asked on
C#: using TMDbLib to retrive person images
I'm trying to retrieve all a persons profile images of a person C#.Net library for TheMovieDB.
https://www.themoviedb.org/person/25541-katherine-heigl/images/profiles?language=en-US
Shows several images
Looking at https://developers.themoviedb.org/3/people/get-person-images
There should be several images for Katherine Heigl So How do I retrieve them
https://www.themoviedb.org/person/25541-katherine-heigl/images/profiles?language=en-US
Shows several images
// This gets info about a person
var TMDBperson = client.GetPersonAsync(person.Id ).Result;
// then loop through but it's null
ImagesflowLayoutPanel.Controls.Clear();
foreach (var image in TMDBperson.Images.Profiles)
{
var PIB = new PersonImageBox(image);
ImagesflowLayoutPanel.Controls.Add(PIB);
}
// you can chain queries together something like this
// but not happy
var TMDBperson = client.GetPersonAsync(person.Id, TMDbLib.Objects.People.ProfileImages ).Result;
Looking at https://developers.themoviedb.org/3/people/get-person-images
There should be several images for Katherine Heigl So How do I retrieve them
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
The ImageData from https://github.com/LordMike/TMDbLib/tree/master/TMDbLib/Objects/General contains only the image file path. In order to retrieve the files you'll need to retrieve the files via a request to the server. https://stackoverflow.com/questions/3615800/download-image-from-the-site-in-net-c