Skip to content

Commit 485c49f

Browse files
authored
Update CSharp-thumb.md
1 parent 0b6db20 commit 485c49f

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

articles/cognitive-services/Computer-vision/QuickStarts/CSharp-thumb.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,32 +48,20 @@ namespace CSHttpClientSample
4848
{
4949
static class Program
5050
{
51-
// Add your Computer Vision subscription key and endpoint to your environment variables.
51+
// Add your Computer Vision subscription key and base endpoint to your environment variables.
5252
static string subscriptionKey = Environment.GetEnvironmentVariable("COMPUTER_VISION_SUBSCRIPTION_KEY");
53-
5453
static string endpoint = Environment.GetEnvironmentVariable("COMPUTER_VISION_ENDPOINT");
5554

56-
// the GenerateThumbnail method endpoint
57-
static string uriBase = endpoint + "vision/v2.1/generateThumbnail";
55+
// The GenerateThumbnail method endpoint
56+
static string uriBase = endpoint + "vision/v3.0/generateThumbnail";
57+
// Add an image to your bin/debug/netcoreappX.X folder, then add the image name (with extension), here
58+
static string imageFilePath = @"my-image-name";
5859

59-
static async Task Main()
60+
public static void Main()
6061
{
61-
// Get the path and filename to process from the user.
62-
Console.WriteLine("Thumbnail:");
63-
Console.Write(
64-
"Enter the path to the image you wish to use to create a thumbnail image: ");
65-
string imageFilePath = Console.ReadLine();
6662

67-
if (File.Exists(imageFilePath))
68-
{
69-
// Call the REST API method.
70-
Console.WriteLine("\nWait a moment for the results to appear.\n");
71-
await MakeThumbNailRequest(imageFilePath);
72-
}
73-
else
74-
{
75-
Console.WriteLine("\nInvalid file path");
76-
}
63+
MakeThumbNailRequest(imageFilePath).Wait();
64+
7765
Console.WriteLine("\nPress Enter to exit...");
7866
Console.ReadLine();
7967
}

0 commit comments

Comments
 (0)