Skip to content

Commit aeff58c

Browse files
committed
Fixes
1 parent fa6e157 commit aeff58c

File tree

4 files changed

+8
-16
lines changed

4 files changed

+8
-16
lines changed

articles/ai-services/computer-vision/how-to/background-removal.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Create a new **VisionSource** object from the URL of the image you want to analy
8080
[!code-csharp[](~/azure-ai-vision-sdk/docs/learn.microsoft.com/csharp/image-analysis/how-to/program.cs?name=vision_source)]
8181

8282
> [!TIP]
83-
> You can also analyze a local image by passing in the full-path image file name. See [VisionSource.FromFile](/dotnet/api/azure.ai.vision.common.visionsource.fromfile).
83+
> You can also analyze a local image by passing in the full-path image file name (see [VisionSource.FromFile](/dotnet/api/azure.ai.vision.common.visionsource.fromfile)), or by copying the image into the SDK's input buffer (see [VisionSource.FromImageSourceBuffer](/dotnet/api/azure.ai.vision.common.visionsource.fromimagesourcebuffer))
8484
8585
#### [Python](#tab/python)
8686

@@ -89,7 +89,7 @@ In your script, create a new [VisionSource](/python/api/azure-ai-vision/azure.ai
8989
[!code-python[](~/azure-ai-vision-sdk/docs/learn.microsoft.com/python/image-analysis/how-to/main.py?name=vision_source)]
9090

9191
> [!TIP]
92-
> You can also analyze a local image by passing in the full-path image file name to the **VisionSource** constructor instead of the image URL.
92+
> You can also analyze a local image by passing in the full-path image file name to the **VisionSource** constructor instead of the image URL (see argument name **filename**). Alternatively, you can analyze an image in a memory buffer by constructing **VisionSource** using the argument **image_source_buffer**.
9393
9494
#### [C++](#tab/cpp)
9595

@@ -98,7 +98,7 @@ Create a new **VisionSource** object from the URL of the image you want to analy
9898
[!code-cpp[](~/azure-ai-vision-sdk/docs/learn.microsoft.com/cpp/image-analysis/how-to/how-to.cpp?name=vision_source)]
9999

100100
> [!TIP]
101-
> You can also analyze a local image by passing in the full-path image file name. See [VisionSource::FromFile](/cpp/cognitive-services/vision/input-visionsource#fromfile).
101+
> You can also analyze a local image by passing in the full-path image file name (see [VisionSource::FromFile](/cpp/cognitive-services/vision/input-visionsource#fromfile)), or by copying the image into the SDK's input buffer (see [VisionSource::FromImageSourceBuffer](/cpp/cognitive-services/vision/input-visionsource#fromimagesourcebuffer)).
102102
103103
#### [REST API](#tab/rest)
104104

articles/ai-services/computer-vision/includes/how-to-guides/analyze-image-40-cpp.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ You can select an image by providing a publicly accessible image URL, a local im
4141

4242
Create a new **VisionSource** object from the URL of the image you want to analyze, using the static constructor [VisionSource::FromUrl](/cpp/cognitive-services/vision/input-visionsource#fromurl).
4343

44-
The code in this guide uses an example image URL. You may want to try different images on your own to see the full capability of the Image Analysis service.
45-
4644
[!code-cpp[](~/azure-ai-vision-sdk/docs/learn.microsoft.com/cpp/image-analysis/how-to/how-to.cpp?name=vision_source)]
4745

4846
### Image file
@@ -60,7 +58,7 @@ This is done by first creating a new [ImageSourceBuffer](/cpp/cognitive-services
6058
```cpp
6159
auto imageSourceBuffer = std::make_shared<ImageSourceBuffer>();
6260
imageSourceBuffer->GetWriter()->Write(imageBuffer.data(), imageBuffer.size());
63-
auto visionSource = VisionSource::FromImageSourceBuffer(imageSourceBuffer);
61+
auto imageSource = VisionSource::FromImageSourceBuffer(imageSourceBuffer);
6462
```
6563
6664
## Select analysis options

articles/ai-services/computer-vision/includes/how-to-guides/analyze-image-40-csharp.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ You can select an image by providing a publicly accessible image URL, a local im
3838

3939
Create a new **VisionSource** object from the URL of the image you want to analyze, using the static constructor [VisionSource.FromUrl](/dotnet/api/azure.ai.vision.common.visionsource.fromurl). **VisionSource** implements **IDisposable**, therefore create the object with a **using** statement or explicitly call **Dispose** method after analysis completes.
4040

41-
The code in this guide uses an example image URL. You may want to try different images on your own to see the full capability of the Image Analysis service.
42-
4341
[!code-csharp[](~/azure-ai-vision-sdk/docs/learn.microsoft.com/csharp/image-analysis/how-to/program.cs?name=vision_source)]
4442

4543
### Image file
@@ -57,7 +55,7 @@ This is done by first creating a new [ImageSourceBuffer](/dotnet/api/azure.ai.vi
5755
```csharp
5856
using var imageSourceBuffer = new ImageSourceBuffer();
5957
imageSourceBuffer.GetWriter().Write(imageBuffer);
60-
using var visionSource = VisionSource.FromImageSourceBuffer(imageSourceBuffer);
58+
using var imageSource = VisionSource.FromImageSourceBuffer(imageSourceBuffer);
6159
```
6260

6361
Both **VisionSource** and **ImageSourceBuffer** implement **IDisposable**, therefore create the objects with a **using** statement or explicitly call their **Dispose** method after analysis completes.

articles/ai-services/computer-vision/includes/how-to-guides/analyze-image-40-python.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ You can select an image by providing a publicly accessible image URL, a local im
3838

3939
In your script, create a new [VisionSource](/python/api/azure-ai-vision/azure.ai.vision.visionsource) object from the URL of the image you want to analyze.
4040

41-
The code in this guide uses an example image URL. You may want to try different images on your own to see the full capability of the Image Analysis service.
42-
4341
[!code-python[](~/azure-ai-vision-sdk/docs/learn.microsoft.com/python/image-analysis/how-to/main.py?name=vision_source)]
4442

4543
### Image file
@@ -52,12 +50,10 @@ In your script, create a new [VisionSource](/python/api/azure-ai-vision/azure.ai
5250

5351
In your script, first create an [image_source_buffer](/python/api/azure-ai-vision/azure.ai.vision.imagesourcebuffer). Get its [image_writer](/python/api/azure-ai-vision/azure.ai.vision.imagewriter) and call the **write** method to copy the image data into the writer. Then create a new [vision_source](/python/api/azure-ai-vision/azure.ai.vision.visionsource) object from your **image_source_buffer**. In the following code example, `image_buffer` is a variable of type `bytes` containing the image data.
5452

55-
```java
56-
import azure.ai.vision as visionsdk
57-
58-
image_source_buffer = visionsdk.ImageSourceBuffer()
53+
```python
54+
image_source_buffer = sdk.ImageSourceBuffer()
5955
image_source_buffer.image_writer.write(image_buffer)
60-
vision_source = visionsdk.VisionSource(image_source_buffer=image_source_buffer)
56+
vision_source = sdk.VisionSource(image_source_buffer=image_source_buffer)
6157
```
6258

6359
## Select analysis options

0 commit comments

Comments
 (0)