Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read and view image.png ?
#8
(Mar-01-2021, 12:41 PM)snippsat Wrote: Again the problem is that this is related to web-framework you are building,which you are not mentioning.
There is different use case from a web-framework that user just open a image in browser.
web-framework serve(not open) static files for eg a folder static/images.
Then bind images path to root url,here a example in Flask.
In example over the link would be http://127.0.0.1:5000/Joker.png.
For low level close to WSGI look what's under Flaskl,Werkzeug Serve Shared Static Files

Thanks for the feedback but the framework structure is functional where I can read and view .svg files without any problems! Does this only happen in the case of opening image files? Follow the code below:

o_file = open("cloud.png", "rb")
o_file = o_file.read()
Reply


Messages In This Thread
Read and view image.png ? - by JohnnyCoffee - Feb-28-2021, 04:09 AM
RE: Read and view image.png ? - by Larz60+ - Feb-28-2021, 06:06 PM
RE: Read and view image.png ? - by JohnnyCoffee - Feb-28-2021, 06:41 PM
RE: Read and view image.png ? - by Larz60+ - Feb-28-2021, 06:43 PM
RE: Read and view image.png ? - by JohnnyCoffee - Feb-28-2021, 11:54 PM
RE: Read and view image.png ? - by JohnnyCoffee - Feb-28-2021, 11:54 PM
RE: Read and view image.png ? - by snippsat - Mar-01-2021, 12:41 PM
RE: Read and view image.png ? - by JohnnyCoffee - Mar-01-2021, 02:43 PM
RE: Read and view image.png ? - by ndc85430 - Mar-01-2021, 03:48 PM
RE: Read and view image.png ? - by JohnnyCoffee - Mar-01-2021, 05:07 PM
RE: Read and view image.png ? - by JohnnyCoffee - Mar-02-2021, 03:28 PM
RE: Read and view image.png ? - by deanhystad - Mar-02-2021, 04:20 PM
RE: Read and view image.png ? - by JohnnyCoffee - Mar-21-2021, 01:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to read from image with several languages using inage_to_string()? EvilSnail 0 2,210 Nov-13-2021, 03:11 PM
Last Post: EvilSnail

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020