Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Warrick Newsgroups: comp.lang.python Subject: Re: Python PNG Viewer(Browser Based) Date: Tue, 3 Nov 2015 17:01:42 +0100 Lines: 42 Message-ID: References: <9c24559b-17a4-41fc-80a2-9258fd84c9f1@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de N6CAaXWGHjn0tv+fwU/aqAgc/76imisHlMIUZUHydhzg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.016 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'handler': 0.04; 'subject:Python': 0.05; 'problem?': 0.07; 'pil': 0.09; 'url:github': 0.09; 'template': 0.11; 'files.': 0.13; 'everyone,': 0.15; 'png': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; '2015': 0.20; 'import': 0.24; 'written': 0.24; 'header:In-Reply-To:1': 0.24; 'sense': 0.26; 'chris': 0.26; 'figure': 0.27; 'message-id:@mail.gmail.com': 0.27; 'idea': 0.28; 'random': 0.29; 'url:mailman': 0.30; 'code': 0.30; 'getting': 0.33; 'problem': 0.33; 'url:python': 0.33; 'url:listinfo': 0.34; 'file': 0.34; 'add': 0.34; 'received:google.com': 0.35; 'necessary.': 0.35; 'supports': 0.35; 'but': 0.36; 'skip:i 20': 0.36; 'url:org': 0.36; 'lines': 0.36; 'received:209.85': 0.36; 'possible': 0.36; 'basic': 0.36; 'framework': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'being': 0.37; 'received:209': 0.38; 'skip:p 20': 0.38; 'files': 0.38; 'does': 0.39; 'enough': 0.39; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'where': 0.40; 'some': 0.40; 'your': 0.60; 'hope': 0.61; 'skip:u 10': 0.61; 'side': 0.62; 'lack': 0.76; 'absolutely': 0.88; 'graphical': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=H11ms8nzwpCnPTa6BMLT6rUtTmLI6yJmM8TWh2e0C7Q=; b=sa1spUmgtURYolhsYxGfm7s0dQaO9kdrx1OPWMbhVxHUNkXk0+zkgYaV2fPnYfPAio sJpBGle+bWcrGKHZRLxDEamz6s8h+HagpIwA6oqrGkIN5spiBSo9Y32HALHeRNvfTmKI L3TfxXndHBL8SbcDCqfDwI5acTonhpIsZWzcpzS5Wxb+mPTOXh1VfIwiGOtUyL/R+bmT KgD2exU4VjX4G2GtX+Ute3OMaU+R3MitblF/vDF0tuCW3QT3bI0PxdTGq4ma7pVbmRFk 5yK8WFXogFuF8X+2yHXaFq/GYzI9xubK4pLi4sO0W4eT+7ovAp8M7JJz0t2np9wo09pF MRbw== X-Received: by 10.112.146.106 with SMTP id tb10mr7173138lbb.64.1446566502842; Tue, 03 Nov 2015 08:01:42 -0800 (PST) In-Reply-To: <9c24559b-17a4-41fc-80a2-9258fd84c9f1@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:98169 On 3 November 2015 at 12:54, Arshpreet Singh 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 =3D Image.open("file.png").show() > > > But I am not getting right sense that how to make possible using Python+F= lask. > > 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 tag. Just figure out where to add the PNG handler code and read any random =E2=80=9Chow to add images to a webpage=E2=80=9D 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. --=20 Chris Warrick PGP: 5EAAEA16