1.0.0-beta.2 (2024-02-09)
Breaking Changes
- In the previous version, you would call the
analyze
method on theImageAnalysisClient
orImageAnalysisAsyncClient
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 dedicatedanalyzeFromUrl
method to analyze an image from URL (and note that you now provide the URL as aString
instead ofjava.net.URL
). Keep calling theanalyze
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 individualset
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.