[Checkins] SVN: z3c.image/trunk/src/z3c/image/proc/ increased maxblock

Bernd Dorn bernd.dorn at fhv.at
Thu Aug 31 11:49:11 EDT 2006


Log message for revision 69902:
  increased maxblock

Changed:
  U   z3c.image/trunk/src/z3c/image/proc/adapter.py
  U   z3c.image/trunk/src/z3c/image/proc/browser.py

-=-
Modified: z3c.image/trunk/src/z3c/image/proc/adapter.py
===================================================================
--- z3c.image/trunk/src/z3c/image/proc/adapter.py	2006-08-31 14:30:56 UTC (rev 69901)
+++ z3c.image/trunk/src/z3c/image/proc/adapter.py	2006-08-31 15:49:10 UTC (rev 69902)
@@ -12,7 +12,7 @@
 from zope.app.cache.ram import RAMCache
 
 # see http://mail.python.org/pipermail/image-sig/2003-May/002228.html
-ImageFile.MAXBLOCK = 1024*1024
+ImageFile.MAXBLOCK = 1024*1024*10
 imgCache = RAMCache()
 
 class ProcessableImage(object):

Modified: z3c.image/trunk/src/z3c/image/proc/browser.py
===================================================================
--- z3c.image/trunk/src/z3c/image/proc/browser.py	2006-08-31 14:30:56 UTC (rev 69901)
+++ z3c.image/trunk/src/z3c/image/proc/browser.py	2006-08-31 15:49:10 UTC (rev 69902)
@@ -112,9 +112,12 @@
     def __init__(self,context,request):
         super(ResizedImageView,self).__init__(context,request)
         data = context.data
-        if not isinstance(context.data, str):
+        if not isinstance(data, str):
+            pos = data.tell()
             data.seek(0)
-            data = data.read(1024*16)
+            res = data.read(1024*1024)
+            data.seek(pos)
+            data = res
         else:
             data = self.context.data
         t,w,h = getImageInfo(data)



More information about the Checkins mailing list