reportlab/pdfgen/pdfimages.py
changeset 491 6bf7da76b8fd
parent 490 03c081d12447
child 494 54257447cfe9
--- a/reportlab/pdfgen/pdfimages.py	Tue Oct 24 02:05:22 2000 +0000
+++ b/reportlab/pdfgen/pdfimages.py	Tue Oct 24 10:47:14 2000 +0000
@@ -1,63 +1,18 @@
-###############################################################################
-#
-#	ReportLab Public License Version 1.0
-#
-#   Except for the change of names the spirit and intention of this
-#   license is the same as that of Python
-#
-#	(C) Copyright ReportLab Inc. 1998-2000.
-#
-#
-# All Rights Reserved
-#
-# Permission to use, copy, modify, and distribute this software and its
-# documentation for any purpose and without fee is hereby granted, provided
-# that the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of ReportLab not be used
-# in advertising or publicity pertaining to distribution of the software
-# without specific, written prior permission. 
-# 
-#
-# Disclaimer
-#
-# ReportLab Inc. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-# SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
-# IN NO EVENT SHALL ReportLab BE LIABLE FOR ANY SPECIAL, INDIRECT
-# OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-# OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THIS SOFTWARE. 
-#
-###############################################################################
-#	$Log: pdfimages.py,v $
-#	Revision 1.1  2000/10/24 02:05:22  aaron_watters
-#	image functionality factored out of canvas.py initial checkin. tests pass
-#
-#	
-__version__=''' $Id: pdfimages.py,v 1.1 2000/10/24 02:05:22 aaron_watters Exp $ '''
+__version__=''' $Id: pdfimages.py,v 1.2 2000/10/24 10:47:14 rgbecker Exp $ '''
 __doc__="""
 Image functionality sliced out of canvas.py for generalization
 """
-# UNCOMMENT AS NEEDED
 import os
-#import sys
 import string
-#import time
-#import tempfile
 import cStringIO
-from types import *
-#from math import sin, cos, tan, pi, ceil
+from types import StringType
+from reportlab.pdfbase import pdfutils
+from reportlab.lib.utils import fp_str
 
-from reportlab.pdfbase import pdfutils
-#from reportlab.pdfbase import pdfdoc
-#from reportlab.pdfbase import pdfmetrics
-#from reportlab.pdfgen  import pdfgeom, pathobject, textobject
-#from reportlab.lib.colors import ColorType, toColor
-
-from reportlab.lib.utils import fp_str
-#_SeqTypes=(TupleType,ListType)
-
+try:
+	import zlib
+except ImportError:
+	zlib = None
 
 class PDFImage:
     def __init__(self, image, x,y, width=None, height=None):
@@ -179,6 +134,44 @@
             canvas._code.append(line)
 
         canvas._code.append('Q')
-        #self._code.append('BT')
 
-        
+###############################################################################
+#
+#	ReportLab Public License Version 1.0
+#
+#   Except for the change of names the spirit and intention of this
+#   license is the same as that of Python
+#
+#	(C) Copyright ReportLab Inc. 1998-2000.
+#
+#
+# All Rights Reserved
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose and without fee is hereby granted, provided
+# that the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of ReportLab not be used
+# in advertising or publicity pertaining to distribution of the software
+# without specific, written prior permission. 
+# 
+#
+# Disclaimer
+#
+# ReportLab Inc. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+# SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+# IN NO EVENT SHALL ReportLab BE LIABLE FOR ANY SPECIAL, INDIRECT
+# OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+# OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE. 
+#
+###############################################################################
+#	$Log: pdfimages.py,v $
+#	Revision 1.2  2000/10/24 10:47:14  rgbecker
+#	Fix zlib import bug
+#
+#	Revision 1.1  2000/10/24 02:05:22  aaron_watters
+#	image functionality factored out of canvas.py initial checkin. tests pass
+#	
+#