예제 #1
0
    def load_url(self, url, filter=None):
        """Load from a URL.

        .. versionadded:: 0.7.1
        """
        response = get_url(url)
        stream = BytesIO(response.content)
        self.load_image(stream, filter=filter)
예제 #2
0
    def load_url(self, url, filter=None):
        """Load from a URL.

        .. versionadded:: 0.7.1
        """
        response = get_url(url)
        stream = BytesIO(response.content)
        self.load_image(stream, filter=filter)
예제 #3
0
파일: vmat.py 프로젝트: darcymason/pylinac
    def load_urls(self, urls):
        """Load from URLs.

        .. versionadded:: 0.7.1
        """
        url_dict = {}
        for idx, url in enumerate(urls):
            response = get_url(url)
            url_dict[idx] = BytesIO(response.content)
        imgs = [item for item in url_dict.values()]
        self.load_images(imgs, names=urls)
예제 #4
0
    def load_urls(self, urls):
        """Load from URLs.

        .. versionadded:: 0.7.1
        """
        url_dict = {}
        for idx, url in enumerate(urls):
            response = get_url(url)
            url_dict[idx] = BytesIO(response.content)
        imgs = [item for item in url_dict.values()]
        self.load_images(imgs, names=urls)