Hello.
There was such a problem, you need to open the url image in python 2.7 without downloading the file and not through the browser. Is it possible
I tried to do it through the kivy library, but there’s nothing to understand and for some reason he cannot open the jpg image. Through the PIL also does not come out ...
|
1 answer
from kivy.app import App from kivy.uix.image import AsyncImage from kivy.lang import Builder Builder.load_string(''' <CenteredAsyncImage>: size: self.texture_size size_hint: None, None pos_hint: {'center_x': 0.5, 'center_y': 0.5} ''') class CenteredAsyncImage(AsyncImage): pass class TestAsyncApp(App): def build(self): return CenteredAsyncImage( source='URL') if __name__ == '__main__': TestAsyncApp().run() And using Kivy just to display an image is the same as nailing a microscope! Would you try OpenCV ...
|
python-m SimpleHTTPServercommand in the directory with a picture to make it accessible via http. When you encounter a specific problem, post the minimum code example that shows it the minimum reproducible example - jfs