encoded static method

Future<ImageDescriptor> encoded(
  1. ImmutableBuffer buffer
)

Creates an image descriptor from encoded data in a supported format.

Implementation

static Future<ImageDescriptor> encoded(ImmutableBuffer buffer) {
  final _NativeImageDescriptor descriptor = _NativeImageDescriptor._();
  return _futurize((_Callback<void> callback) {
    return descriptor._initEncoded(buffer, callback);
  }).then((_) => descriptor);
}