Python PNG Viewer(Browser Based)

Chris Warrick kwpolska at gmail.com
Tue Nov 3 11:01:42 EST 2015


On 3 November 2015 at 12:54, Arshpreet Singh <arsh840 at gmail.com> wrote:
> Hello Everyone,
>
> I am looking for Browser-based PNG file viewer written in
> Python.(Flask framework preferably)
>
> Following project(Flask-Based) provides many things(File manager as
> well as file viewer)  but it does not support PNG files.
>
> https://github.com/vmi356/filemanager
>
> Any idea if I have to write my own browser based PNG viewer from
> scratch(Using PIL or other required library)
>
> On the other side if I have to write only Desktop-based only two lines
> are enough to do many things:
>
> Like,
>
> from PIL import Image
> f = Image.open("file.png").show()
>
>
> But I am not getting right sense that how to make possible using Python+Flask.
>
> Hope I am able to tell my problem?
> --
> https://mail.python.org/mailman/listinfo/python-list

Your problem is lack of basic understanding of the Internet. Because
EVERY graphical web browser supports PNG files NATIVELY. With a single
<img> tag.

Just figure out where to add the PNG handler code and read any random
“how to add images to a webpage” tutorial.
You might need a new template and some code that is aware of the file
being an image. But absolutely no PNG viewer is necessary.

-- 
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16



More information about the Python-list mailing list