Skip to content

Commit

Permalink
Impossible retrieve video preview
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerdomante committed Jan 6, 2024
1 parent 9f2e21c commit 8e75d3f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
18 changes: 12 additions & 6 deletions NasaPod/Core/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -287,15 +287,21 @@ public static class Images
{
public static async Task<Image> GetImageAsync(string imageUrl)
{
WebClient client = new WebClient();
byte[] imageData = await client.DownloadDataTaskAsync(imageUrl);
Image image = Image.FromStream(new System.IO.MemoryStream(imageData));
try
{
WebClient client = new WebClient();
byte[] imageData = await client.DownloadDataTaskAsync(imageUrl);
Image image = Image.FromStream(new System.IO.MemoryStream(imageData));

// Visualizziamo le dimensioni dell'immagine
return image;
// Visualizziamo le dimensioni dell'immagine
return image;
}
catch(Exception ex)
{
throw new Exception($"Impossible retrieve video preview");
}
}


public static Image FillImage(Image image, AppSettings settings)
{
// Create a new bitmap with the desired size and resolution
Expand Down
4 changes: 2 additions & 2 deletions NasaPod/Nasa.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<SignAssembly>False</SignAssembly>
<PackageProjectUrl>https://github.com/Nerdomante/NasaAPOD</PackageProjectUrl>
<RepositoryUrl>https://github.com/Nerdomante/NasaAPOD</RepositoryUrl>
<AssemblyVersion>1.2.5</AssemblyVersion>
<FileVersion>1.2.5</FileVersion>
<AssemblyVersion>1.2.6</AssemblyVersion>
<FileVersion>1.2.6</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 8e75d3f

Please sign in to comment.