Skip to content

Commit 4ab5b94

Browse files
vision: docs: show base64 usage (#2145)
1 parent 2cc3836 commit 4ab5b94

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

packages/vision/src/index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,19 @@ Vision.prototype.annotate = function(requests, callback) {
208208
* // Error handling omitted.
209209
* }
210210
*
211-
* vision.detect(image, function(err, detection, apiResponse) {});
211+
* vision.detect(image, types, function(err, detection, apiResponse) {});
212212
* });
213213
*
214214
* //-
215+
* // If you have a base64 string, provide it in a Buffer.
216+
* //-
217+
* var myBase64ImageRepresentation = '...';
218+
*
219+
* var image = new Buffer(myBase64ImageRepresentation, 'base64');
220+
*
221+
* vision.detect(image, types, function(err, detection, apiResponse) {});
222+
*
223+
* //-
215224
* // Supply multiple images for feature detection.
216225
* //-
217226
* var images = [

0 commit comments

Comments
 (0)