Link to home
Start Free TrialLog in
Avatar of trevor1940
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

// 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;

Open in new window


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
Avatar of Eduard Ghergu
Eduard Ghergu
Flag of Romania image

Hi,

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
ASKER CERTIFIED SOLUTION
Avatar of trevor1940
trevor1940

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial