Generate Thumbnail

A thumbnail is a reduced-size representation of an image. Thumbnails are used to
represent images and other data in a more economical,
layout-friendly way. The
Computer Vision API uses smart cropping, together with resizing the image, to
create intuitive thumbnails for a given 
image.

Technical Reference

 

 

 

 

INPUT

Height: Specify the required height of the thumbnail image. Recommended is 50.

ImagePath: Specify the path of the image for which a thumbnail must be generated.

Width: Specify the required width of the thumbnail image. Recommended is 50.

 

  

 

 

 

 

MISC

Display Name: Displays the name of the activity. You can also customize the activity name to help troubleshoot issues faster. This name will be used for logging purposes.

SkipOnError: It specifies whether to continue executing the workflow even if it throws an error. This supports only Boolean value “True or False”

True: Continues to execute the workflow irrespective of any error thrown.

False: Stops the workflow if it throws any error

Version: It specifies the version of the Microsoft computer vision feature in use.

 

OPTION

SmartCropping: Specify true if the given aspect ratio differs from the input image. This accepts only Boolean values. This is not a mandatory field.

 

 

OUTPUT

Output: Declare a variable here to see the result of the analyzed image.This is not a mandatory field. However, to see the path of the generated thumbnail a variable must be declared here.

Result: Define a Boolean value to validate the success state of the activity. This is not a mandatory field.

*Mandatory field to execute the workflow

Use Case

The following activity illustrates on how we can use the generate thumbnail activity
to form a thumbnail of the given image.

Steps to execute the bot

1.     Drag and drop the Microsoft vision scope activity to the workflow.

2.     Click on the activity and enter the service URL and Subscription key.

3.     Drag and drop the generate thumbnail activity into the scope.

4.     Click n the activity.

5.     Specify the height required for the thumbnail image. Here it is “50”

6.     Enter the path of the image for which a thumbnail must be generated.

7.     Specify the width required for the thumbnail image. Here it is “50”

8.     Specify true for smart cropping if the given aspect ratio differs from the original image.

9.     Enter the declared variable in the output box of the output segment. Here it is “Test”

10.  Drag and drop a writelog activity below the generate thumbnail activity.

11.  Click on the activity and enter the same variable declared above. Here it is “Test”

12. Enter the log level as “Info”.

13.  Execute the activity.

14.  The output seen in the output box has the location in which the generated thumbnail
image is stored. Navigate to that path to see the thumbnail image.

The bot executes the activity and generates a thumbnail image which is stored
in the location seen in the output box.