@@ -133,6 +133,7 @@ Vision.prototype.annotate = function(requests, callback) {
133
133
} ) ;
134
134
} ;
135
135
136
+ // jscs:disable maximumLineLength
136
137
/**
137
138
* Detect properties from an image (or images) of one or more types.
138
139
*
@@ -156,9 +157,10 @@ Vision.prototype.annotate = function(requests, callback) {
156
157
* For the response in the original format, review the `apiResponse` argument
157
158
* your callback receives.
158
159
*
159
- * @param {string|string[]|module:storage/file|module:storage/file[] } images -
160
- * The source image(s) to run the detection on. It can be either a local
161
- * image path, a remote image URL, or a @google-cloud/storage File object.
160
+ * @param {string|string[]|buffer|buffer[]|module:storage/file|module:storage/file[] } images - The
161
+ * source image(s) to run the detection on. It can be either a local image
162
+ * path, a remote image URL, a Buffer, or a @google-cloud/storage File
163
+ * object.
162
164
* @param {string[]|object= } options - An array of types or a configuration
163
165
* object.
164
166
* @param {object= } options.imageContext - See an
@@ -210,6 +212,20 @@ Vision.prototype.annotate = function(requests, callback) {
210
212
* vision.detect(img, types, function(err, detection, apiResponse) {});
211
213
*
212
214
* //-
215
+ * // Run feature detection over a Buffer.
216
+ * //-
217
+ * var level = require('level');
218
+ * var db = level('./users-database');
219
+ *
220
+ * db.get('user-image', { encoding: 'binary' }, function(err, image) {
221
+ * if (err) {
222
+ * // Error handling omitted.
223
+ * }
224
+ *
225
+ * vision.detect(image, function(err, detection, apiResponse) {});
226
+ * });
227
+ *
228
+ * //-
213
229
* // Supply multiple images for feature detection.
214
230
* //-
215
231
* var images = [
@@ -519,6 +535,7 @@ Vision.prototype.detect = function(images, options, callback) {
519
535
} ) ;
520
536
} ) ;
521
537
} ;
538
+ // jscs:enable maximumLineLength
522
539
523
540
/**
524
541
* Run face detection against an image.
0 commit comments