Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #98209

Re: Python PNG Viewer(Browser Based)

X-Received by 10.66.140.108 with SMTP id rf12mr3834395pab.12.1446618472373; Tue, 03 Nov 2015 22:27:52 -0800 (PST)
X-Received by 10.50.78.138 with SMTP id b10mr333589igx.10.1446618472140; Tue, 03 Nov 2015 22:27:52 -0800 (PST)
Path csiph.com!xmission!news.glorb.com!i2no3850546igv.0!news-out.google.com!z4ni45824ign.0!nntp.google.com!i2no3850537igv.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Tue, 3 Nov 2015 22:27:51 -0800 (PST)
In-Reply-To <mailman.33.1446566504.8789.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=117.205.68.116; posting-account=LPV9ggoAAAB0QwvcAJJbW6Xr98w8dVCs
NNTP-Posting-Host 117.205.68.116
References <9c24559b-17a4-41fc-80a2-9258fd84c9f1@googlegroups.com> <mailman.33.1446566504.8789.python-list@python.org>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <f20799fe-6c23-4417-b5ae-d2acd75fa3ce@googlegroups.com> (permalink)
Subject Re: Python PNG Viewer(Browser Based)
From Arshpreet Singh <arsh840@gmail.com>
Injection-Date Wed, 04 Nov 2015 06:27:52 +0000
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Xref csiph.com comp.lang.python:98209

Show key headers only | View raw


On Tuesday, 3 November 2015 21:32:03 UTC+5:30, Chris Warrick  wrote:
> On 3 November 2015 at 12:54, Arshpreet Singh <arsh840@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. 

Yes That's true at some level.

>Because
> EVERY graphical web browser supports PNG files NATIVELY. With a single
> <img> tag.

That is easily understandable. 
 
> 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.

My present working system shows me list of all files (PNGs, JPGs, txt, SVGs) in browser, when I click on file it opens it and show contents of it. but PNG and JPGs are not working. Surely handling one PNG file is easy but no idea how to solve multiple file situation.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python PNG Viewer(Browser Based) Arshpreet Singh <arsh840@gmail.com> - 2015-11-03 03:54 -0800
  Re: Python PNG Viewer(Browser Based) Chris Warrick <kwpolska@gmail.com> - 2015-11-03 17:01 +0100
    Re: Python PNG Viewer(Browser Based) Arshpreet Singh <arsh840@gmail.com> - 2015-11-03 22:27 -0800
      Re: Python PNG Viewer(Browser Based) Ben Finney <ben+python@benfinney.id.au> - 2015-11-04 18:23 +1100
  Re: Python PNG Viewer(Browser Based) marco.nawijn@colosso.nl - 2015-11-03 08:25 -0800

csiph-web