reportlab/pdfgen/pdfimages.py
author rgbecker
Tue, 24 Oct 2000 10:47:14 +0000
changeset 491 6bf7da76b8fd
parent 490 03c081d12447
child 494 54257447cfe9
permissions -rw-r--r--
Fix zlib import bug
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
491
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
     1
__version__=''' $Id: pdfimages.py,v 1.2 2000/10/24 10:47:14 rgbecker Exp $ '''
490
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
     2
__doc__="""
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
     3
Image functionality sliced out of canvas.py for generalization
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
     4
"""
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
     5
import os
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
     6
import string
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
     7
import cStringIO
491
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
     8
from types import StringType
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
     9
from reportlab.pdfbase import pdfutils
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
    10
from reportlab.lib.utils import fp_str
490
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    11
491
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
    12
try:
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
    13
	import zlib
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
    14
except ImportError:
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
    15
	zlib = None
490
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    16
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    17
class PDFImage:
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    18
    def __init__(self, image, x,y, width=None, height=None):
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    19
        self.image = image
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    20
        self.point = (x,y)
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    21
        self.dimensions = (width, height)
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    22
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    23
    def jpg_imagedata(self):
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    24
        #directly process JPEG files
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    25
        #open file, needs some error handling!!
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    26
        imageFile = open(self.image, 'rb')
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    27
        info = pdfutils.readJPEGInfo(imageFile)
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    28
        imgwidth, imgheight = info[0], info[1]
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    29
        if info[2] == 1:
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    30
            colorSpace = 'DeviceGray'
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    31
        elif info[2] == 3:
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    32
            colorSpace = 'DeviceRGB'
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    33
        else: #maybe should generate an error, is this right for CMYK?
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    34
            colorSpace = 'DeviceCMYK'
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    35
        imageFile.seek(0) #reset file pointer
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    36
        imagedata = []
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    37
        #imagedata.append('BI /Width %d /Height /BitsPerComponent 8 /ColorSpace /%s /Filter [/Filter [ /ASCII85Decode /DCTDecode] ID' % (info[0], info[1], colorSpace))
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    38
        imagedata.append('BI /W %d /H %d /BPC 8 /CS /%s /F [/A85 /DCT] ID' % (imgwidth, imgheight, colorSpace))
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    39
        #write in blocks of (??) 60 characters per line to a list
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    40
        compressed = imageFile.read()
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    41
        encoded = pdfutils._AsciiBase85Encode(compressed)
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    42
        outstream = cStringIO.StringIO(encoded)
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    43
        dataline = outstream.read(60)
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    44
        while dataline <> "":
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    45
            imagedata.append(dataline)
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    46
            dataline = outstream.read(60)
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    47
        imagedata.append('EI')
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    48
        return (imagedata, imgwidth, imgheight)
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    49
    
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    50
    def cache_imagedata(self):
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    51
        image = self.image
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    52
        if not pdfutils.cachedImageExists(image):
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    53
            if not zlib:
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    54
                print 'zlib not available'
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    55
                return
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    56
            try:
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    57
                import Image
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    58
            except ImportError:
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    59
                print 'Python Imaging Library not available'
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    60
                return
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    61
            pdfutils.cacheImageFile(image)
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    62
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    63
        #now we have one cached, slurp it in
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    64
        cachedname = os.path.splitext(image)[0] + '.a85'
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    65
        imagedata = open(cachedname,'rb').readlines()
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    66
        #trim off newlines...
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    67
        imagedata = map(string.strip, imagedata)
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    68
        return imagedata
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    69
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    70
    def PIL_imagedata(self):
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    71
        image = self.image
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    72
        if not zlib:
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    73
            print 'zlib not available'
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    74
            return
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    75
        myimage = image.convert('RGB')
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    76
        imgwidth, imgheight = myimage.size
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    77
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    78
        # this describes what is in the image itself
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    79
        # *NB* according to the spec you can only use the short form in inline images
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    80
        #imagedata.append('BI /Width %d /Height /BitsPerComponent 8 /ColorSpace /%s /Filter [/Filter [ /ASCII85Decode /FlateDecode] ID' % (imgwidth, imgheight,'RGB'))
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    81
        imagedata.append('BI /W %d /H %d /BPC 8 /CS /RGB /F [/A85 /Fl] ID' % (imgwidth, imgheight))
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    82
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    83
        #use a flate filter and Ascii Base 85 to compress
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    84
        raw = myimage.tostring()
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    85
        assert(len(raw) == imgwidth * imgheight, "Wrong amount of data for image")
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    86
        compressed = zlib.compress(raw)   #this bit is very fast...
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    87
        encoded = pdfutils._AsciiBase85Encode(compressed) #...sadly this isn't
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    88
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    89
        #write in blocks of (??) 60 characters per line to a list
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    90
        outstream = cStringIO.StringIO(encoded)
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    91
        dataline = outstream.read(60)
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    92
        while dataline <> "":
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    93
            imagedata.append(dataline)
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    94
            dataline = outstream.read(60)
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    95
        imagedata.append('EI')
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    96
        return (imagedata, imgwidth, imgheight) 
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    97
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    98
    def drawInlineImage(self, canvas): #, image, x,y, width=None,height=None):
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
    99
        """Draw an Image into the specified rectangle.  If width and
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   100
        height are omitted, they are calculated from the image size.
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   101
        Also allow file names as well as images.  This allows a
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   102
        caching mechanism"""
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   103
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   104
        image = self.image 
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   105
        (x,y) = self.point
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   106
        (width, height) = self.dimensions
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   107
        
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   108
        if type(image) == StringType:
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   109
            if os.path.splitext(image)[1] in ['.jpg', '.JPG', '.jpeg', '.JPEG']:
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   110
                (imagedata, imgwidth, imgheight) = self.jpg_imagedata()
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   111
            else:
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   112
                if hasattr(self,'noImageCaching') and canvas.noImageCaching:
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   113
                    imagedata = pdfutils.cacheImageFile(image,returnInMemory=1)
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   114
                else:
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   115
                    imagedata = self.cache_imagedata()
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   116
                #parse line two for width, height
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   117
                words = string.split(imagedata[1])
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   118
                imgwidth = string.atoi(words[1])
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   119
                imgheight = string.atoi(words[3])
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   120
        else:
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   121
            (imagedata, imgwidth, imgheight) = self.PIL_imagedata()
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   122
        #now build the PDF for the image.
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   123
        if not width:
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   124
            width = imgwidth
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   125
        if not height:
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   126
            height = imgheight
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   127
        
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   128
        # this says where and how big to draw it
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   129
        if not canvas.bottomup: y = y+height
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   130
        canvas._code.append('q %s 0 0 %s cm' % (fp_str(width), fp_str(height, x, y)))
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   131
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   132
        # self._code.extend(imagedata) if >=python-1.5.2
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   133
        for line in imagedata:
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   134
            canvas._code.append(line)
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   135
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   136
        canvas._code.append('Q')
03c081d12447 image functionality factored out of canvas.py initial checkin. tests pass
aaron_watters
parents:
diff changeset
   137
491
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   138
###############################################################################
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   139
#
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   140
#	ReportLab Public License Version 1.0
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   141
#
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   142
#   Except for the change of names the spirit and intention of this
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   143
#   license is the same as that of Python
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   144
#
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   145
#	(C) Copyright ReportLab Inc. 1998-2000.
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   146
#
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   147
#
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   148
# All Rights Reserved
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   149
#
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   150
# Permission to use, copy, modify, and distribute this software and its
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   151
# documentation for any purpose and without fee is hereby granted, provided
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   152
# that the above copyright notice appear in all copies and that both that
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   153
# copyright notice and this permission notice appear in supporting
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   154
# documentation, and that the name of ReportLab not be used
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   155
# in advertising or publicity pertaining to distribution of the software
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   156
# without specific, written prior permission. 
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   157
# 
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   158
#
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   159
# Disclaimer
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   160
#
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   161
# ReportLab Inc. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   162
# SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   163
# IN NO EVENT SHALL ReportLab BE LIABLE FOR ANY SPECIAL, INDIRECT
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   164
# OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   165
# OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   166
# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   167
# PERFORMANCE OF THIS SOFTWARE. 
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   168
#
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   169
###############################################################################
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   170
#	$Log: pdfimages.py,v $
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   171
#	Revision 1.2  2000/10/24 10:47:14  rgbecker
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   172
#	Fix zlib import bug
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   173
#
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   174
#	Revision 1.1  2000/10/24 02:05:22  aaron_watters
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   175
#	image functionality factored out of canvas.py initial checkin. tests pass
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   176
#	
6bf7da76b8fd Fix zlib import bug
rgbecker
parents: 490
diff changeset
   177
#