Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /iipsrv/trunk/src/JPEGCompressor.cc [r68] .. [r69] Maximize Restore

  Switch to side-by-side view

--- a/iipsrv/trunk/src/JPEGCompressor.cc
+++ b/iipsrv/trunk/src/JPEGCompressor.cc
@@ -89,7 +89,7 @@
      However, this seems to break something in Kakadu, so disable in this case
   */
 #ifndef HAVE_KAKADU
-  mx += 1024;
+    mx += 1024;
 #endif
 
 
@@ -385,7 +385,7 @@
   dest->strip_height = 0;
 
   //  dest->source = data;
-  unsigned char t[width*height*channels];
+  unsigned char t[width*height*channels+1024]; // Add an extra 1k for extra buffering
   dest->source = &t[0];
 
   // Set floating point quality (highest, but possibly slower depending