Returns capabilities data for stand alone imagery and includes
        URIs for the images.
332897
def stand_alone_imagery(self):
        
        return json.loads(self._query(IMAGE, FORECAST, SURFACE_PRESSURE, CAPABILITIES, "").decode(errors="replace"))
662698
def get_uri(self, image):
        '''
        '''
        image = image or ''
        uri = ''

        match = re.match("^(?P<uri>.+)://", image)
        if match:
            uri = match.group('uri')

        return uri
602169
def image_resources(resource_name, options = {})
      options = {
        path:        "#{resource_name}/:digest(/:size)",
        constraints: { size: /\d+x\d+/ },
        only:        [:show]
      }.merge(options)
      resources resource_name, options do
        get :uncropped, on: :member
        get :original, on: :member
        get :download, on: :member
      end
    end
579853
def avail_images(call=None):
    '''
    
    '''
    if call == 'action':
        raise SaltCloudSystemExit(
            'The avail_images function must be called with '
            '-f or --function, or with the --list-images option'
        )

    items = query(action='template')
    ret = {}
    for item in items:
        ret[item.attrib['name']] = item.attrib

    return ret
1368409
def images(self):
        
        uri = "/%s/images" % self.uri_base
        resp, resp_body = self.api.method_get(uri)
        return resp_body
1127268
def _get_image_information(self):
        
        result = yield from self.manager.query("GET", "images/{}/json".format(self._image))
        return result
734908
def get_image_dimensions(request):
        
        if request.service_type is ServiceType.WCS or (isinstance(request.size_x, int) and
                                                       isinstance(request.size_y, int)):
            return request.size_x, request.size_y
        if not isinstance(request.size_x, int) and not isinstance(request.size_y, int):
            raise ValueError("At least one of parameters 'width' and 'height' must have an integer value")
        missing_dimension = get_image_dimension(request.bbox, width=request.size_x, height=request.size_y)
        if request.size_x is None:
            return missing_dimension, request.size_y
        if request.size_y is None:
            return request.size_x, missing_dimension
        raise ValueError("Parameters 'width' and 'height' must be integers or None")
1287170
def render_data_uri(self, **kwargs):
        """"""
        # Force protocol as data uri have none
        kwargs.setdefault('force_uri_protocol', 'https')
        return "data:image/svg+xml;charset=utf-8;base64,%s" % (
            base64.b64encode(self.render(**kwargs)
                             ).decode('utf-8').replace('\n', '')
        )
166859
def avail_images(call=None, location='local'):
    '''
    
    '''
    if call == 'action':
        raise SaltCloudSystemExit(
            'The avail_images function must be called with '
            '-f or --function, or with the --list-images option'
        )

    ret = {}
    for host_name, host_details in six.iteritems(avail_locations()):
        for item in query('get', 'nodes/{0}/storage/{1}/content'.format(host_name, location)):
            ret[item['volid']] = item
    return ret
268220
def dimensions(self):
        
        return ImageDimensions(self._info.file.width, self._info.file.height)
988607
def get_capabilities(self):
        
        d = {}

        ext = self._layer.GetExtent()       # @TODO if a filter is on this may give different results
        llbb = [round(float(v), 4) for v in ext]

        d['LatLongBoundingBox'] = box(llbb[0], llbb[2], llbb[1], llbb[3])
        d['Name']               = self._file.split('/')[-1].split('.')[0]

        return d
1137047
def _load_properties(self):
        """"""
        self.__loaded = True
        
        method = 'flickr.photos.getInfo'
        data = _doget(method, photo_id=self.id)
        
        photo = data.rsp.photo

        self.__secret = photo.secret
        self.__server = photo.server
        self.__isfavorite = photo.isfavorite
        self.__license = photo.license
        self.__rotation = photo.rotation
        


        owner = photo.owner
        self.__owner = User(owner.nsid, username=owner.username,\
                          realname=owner.realname,\
                          location=owner.location)

        self.__title = photo.title.text
        self.__description = photo.description.text
        self.__ispublic = photo.visibility.ispublic
        self.__isfriend = photo.visibility.isfriend
        self.__isfamily = photo.visibility.isfamily

        self.__dateposted = photo.dates.posted
        self.__datetaken = photo.dates.taken
        self.__takengranularity = photo.dates.takengranularity
        
        self.__cancomment = photo.editability.cancomment
        self.__canaddmeta = photo.editability.canaddmeta
        self.__comments = photo.comments.text

        try:
            self.__permcomment = photo.permissions.permcomment
            self.__permaddmeta = photo.permissions.permaddmeta
        except AttributeError:
            self.__permcomment = None
            self.__permaddmeta = None

        #TODO: Implement Notes?
        if hasattr(photo.tags, "tag"):
            if isinstance(photo.tags.tag, list):
                self.__tags = [Tag(tag.id, User(tag.author), tag.raw, tag.text) \
                               for tag in photo.tags.tag]
            else:
                tag = photo.tags.tag
                self.__tags = [Tag(tag.id, User(tag.author), tag.raw, tag.text)]
1288338
private static Observable<Bitmap> getThumbnailFromUri(final Context context, final Uri data) {
    return getThumbnailFromUriWithSizeAndKind(context, data, 0, 0,
        MediaStore.Images.Thumbnails.MINI_KIND);
  }
733499
def image_data(verbose=False):
  """"""
  # This is a principled use of the `global` statement; don't lint me.
  global _IMAGE_DATA  # pylint: disable=global-statement
  if _IMAGE_DATA is None:
    if verbose:
      logger.info("--- Downloading image.")
    with contextlib.closing(urllib.request.urlopen(IMAGE_URL)) as infile:
      _IMAGE_DATA = infile.read()
  return _IMAGE_DATA
1253259
def connect_to_images(region=None, public=True):
    """"""
    return _create_client(ep_name="image", region=region, public=public)
557200
def available_datasets(self):
        """"""
        sensor = self.get_sensor(self['/attr/sensor'])
        nadir_resolution = self.get_nadir_resolution(sensor)
        for var_name, val in self.file_content.items():
            if isinstance(val, SDS):
                ds_info = {
                    'file_type': self.filetype_info['file_type'],
                    'resolution': nadir_resolution,
                }
                if self._is_polar():
                    ds_info['coordinates'] = ['longitude', 'latitude']
                yield DatasetID(name=var_name, resolution=nadir_resolution), ds_info
455965
def _get_scaled_image(self, resource):
        
        image = self._get_image()
        original_width, original_height = resource.size

        k = image.size[0] / float(image.size[1])

        if image.size[0] >= image.size[1]:
            target_width = int(original_width * self.size)
            target_height = int(target_width / k)
        else:
            target_height = int(original_height * self.size)
            target_width = int(target_height * k)

        image = image.resize((target_width, target_height), Image.ANTIALIAS)

        return image