~ubuntu-branches/debian/stretch/electrum/stretch

« back to all changes in this revision

Viewing changes to gui/kivy/tools/.buildozer/android/platform/python-for-android/dist/kivy/python-install/lib/python2.7/site-packages/PIL/ImageFileIO.py

  • Committer: Package Import Robot
  • Author(s): Tristan Seligmann
  • Date: 2016-04-04 03:02:39 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20160404030239-0szgkio8yryjv7c9
Tags: 2.6.3-1
* New upstream release.
  - Drop backported install-wizard-connect.patch.
* Add Suggests: python-zbar and update the installation hint to suggest
  apt-get instead of pip (closes: #819517).
* Bump Standards-Version to 3.9.7 (no changes).
* Update Vcs-* links.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# The Python Imaging Library.
 
3
# $Id$
 
4
#
 
5
# kludge to get basic ImageFileIO functionality
 
6
#
 
7
# History:
 
8
# 1998-08-06 fl   Recreated
 
9
#
 
10
# Copyright (c) Secret Labs AB 1998-2002.
 
11
#
 
12
# See the README file for information on usage and redistribution.
 
13
#
 
14
 
 
15
from StringIO import StringIO
 
16
 
 
17
##
 
18
# The <b>ImageFileIO</b> module can be used to read an image from a
 
19
# socket, or any other stream device.
 
20
# <p>
 
21
# This module is deprecated. New code should use the <b>Parser</b>
 
22
# class in the <a href="imagefile">ImageFile</a> module instead.
 
23
#
 
24
# @see ImageFile#Parser
 
25
 
 
26
class ImageFileIO(StringIO):
 
27
 
 
28
    ##
 
29
    # Adds buffering to a stream file object, in order to
 
30
    # provide <b>seek</b> and <b>tell</b> methods required
 
31
    # by the <b>Image.open</b> method. The stream object must
 
32
    # implement <b>read</b> and <b>close</b> methods.
 
33
    #
 
34
    # @param fp Stream file handle.
 
35
    # @see Image#open
 
36
 
 
37
    def __init__(self, fp):
 
38
        data = fp.read()
 
39
        StringIO.__init__(self, data)