github Azure/azure-sdk-for-java azure-ai-vision-imageanalysis_1.0.0-beta.2

pre-release7 months ago

1.0.0-beta.2 (2024-02-09)

Breaking Changes

  • In the previous version, you would call the analyze method on the ImageAnalysisClient or ImageAnalysisAsyncClient to analyze an image from a publicly accessible URL, or from a memory buffer. To better align with other Azure client libraires, this was changed in this release. Call the new dedicated analyzeFromUrl method to analyze an image from URL (and note that you now provide the URL as a String instead of java.net.URL). Keep calling the analyze method to analyze an image from a memory buffer.
  • The class constructor ImageAnalysisOptions(String language, Boolean genderNeutralCaption, List<Double> smartCropsAspectRatios, String modelVersion) was removed, since it is redundant. Instead use the empty constructor and override default values by calling the individual set method. For example: ImageAnalysisOptions options = new ImageAnalysisOptions().setGenderNeutralCaption(true)

Features Added

Two new public methods were added on the ImageAnalysisClient:

Response<ImageAnalysisResult> analyzeFromUrlWithResponse(String imageUrl, List<VisualFeatures> visualFeatures, ImageAnalysisOptions imageAnalysisOptions, RequestOptions requestOptions)
Response<ImageAnalysisResult> analyzeWithResponse(BinaryData imageData, List<VisualFeatures> visualFeatures, ImageAnalysisOptions imageAnalysisOptions, RequestOptions requestOptions)

Two new public methods were added on the ImageAnalysisAsyncClient:

Mono<Response<ImageAnalysisResult>> analyzeFromUrlWithResponse(String imageUrl, List<VisualFeatures> visualFeatures, ImageAnalysisOptions imageAnalysisOptions, RequestOptions requestOptions)
Mono<Response<ImageAnalysisResult>> analyzeWithResponse(BinaryData imageData, List<VisualFeatures> visualFeatures, ImageAnalysisOptions imageAnalysisOptions, RequestOptions requestOptions)

They provide customization of the HTTP request, and access to HTTP request and response details.
This is not commonly required, but can be useful for service customization or troubleshooting issues.

Don't miss a new azure-sdk-for-java release

NewReleases is sending notifications on new releases.