Paul J. Lucas has proposed merging lp:~zorba-coders/zorba/bug-1158052-image 
into lp:zorba/image-module.

Commit message:
Corresponding changes for bug #1158052.

Requested reviews:
  Paul J. Lucas (paul-lucas)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1158052-image/+merge/170946

Corresponding changes for bug #1158052.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1158052-image/+merge/170946
Your team Zorba Coders is subscribed to branch lp:zorba/image-module.
=== modified file 'src/com/zorba-xquery/www/modules/image/animation.xq.src/animation.cpp'
--- src/com/zorba-xquery/www/modules/image/animation.xq.src/animation.cpp	2011-10-06 08:18:47 +0000
+++ src/com/zorba-xquery/www/modules/image/animation.xq.src/animation.cpp	2013-06-22 13:12:26 +0000
@@ -56,7 +56,7 @@
   Magick::writeImages(lImageList.begin(), lImageList.end(),  &lBlob, true);
   String lEncodedContent = ImageFunction::getEncodedStringFromBlob(lBlob); 
    
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -90,7 +90,7 @@
   Magick::writeImages(lImageList.begin(), lImageList.end(),  &lBlob, true);
   String lEncodedContent = ImageFunction::getEncodedStringFromBlob(lBlob);
 
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }

=== modified file 'src/com/zorba-xquery/www/modules/image/basic.xq.src/basic.cpp'
--- src/com/zorba-xquery/www/modules/image/basic.xq.src/basic.cpp	2013-06-12 05:12:20 +0000
+++ src/com/zorba-xquery/www/modules/image/basic.xq.src/basic.cpp	2013-06-22 13:12:26 +0000
@@ -119,7 +119,7 @@
   String lType = ImageFunction::getOneStringArg(aArgs, 1);
   lImage.magick(lType.c_str());  
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true));
 
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
@@ -150,7 +150,7 @@
 
   lImage.magick(lType.c_str()); // Set output format 
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage); 
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
 
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
@@ -182,7 +182,7 @@
   }
   lImage.quality(lQuality); // Set output format 
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true));
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 
@@ -209,7 +209,7 @@
   lBlankImage.magick(lType.c_str()); // Set output format 
 
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lBlankImage); 
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true));
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
                                                    
@@ -285,5 +285,4 @@
   return new zorba::imagemodule::basicmodule::BasicModule();
 }
 
-
-
+/* vim:set et sw=2 ts=2: */

=== modified file 'src/com/zorba-xquery/www/modules/image/manipulation.xq.src/manipulation.cpp'
--- src/com/zorba-xquery/www/modules/image/manipulation.xq.src/manipulation.cpp	2011-10-06 08:18:47 +0000
+++ src/com/zorba-xquery/www/modules/image/manipulation.xq.src/manipulation.cpp	2013-06-22 13:12:26 +0000
@@ -42,7 +42,7 @@
   const unsigned int lNewHeight = ImageFunction::getOneUnsignedIntArg(aArgs, 2);
   lImage.size(Magick::Geometry(lNewWidth, lNewHeight));
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -67,7 +67,7 @@
   const unsigned int lRatio = lNewWidth/lImage.columns();
   lImage.zoom(Magick::Geometry(lNewWidth, lImage.rows()*lRatio));
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true));
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 
@@ -94,7 +94,7 @@
   const unsigned int lRatio = lNewHeight / lImage.rows();
   lImage.zoom(Magick::Geometry(lImage.columns()*lRatio, lNewHeight));
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 
@@ -120,7 +120,7 @@
   const double lRatio = ImageFunction::getOneDoubleArg(aArgs, 1);
   lImage.zoom(Magick::Geometry(lImage.columns()*lRatio, lImage.rows()*lRatio));
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -149,7 +149,7 @@
   // crop away everything that is either right of lRightLowerX or below lRightLowerY
   lImage.crop(Magick::Geometry(lWidth, lHeight));
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -201,7 +201,7 @@
     lImage.composite(lOverlayImage, lLeftUpperX, lLeftUpperY, Magick::BumpmapCompositeOp);
   } 
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -227,7 +227,7 @@
   // chop away everything that is either left of lLeftUpperX or above lLeftUpperY
   lImage.chop(Magick::Geometry(lLeftUpperX, lLeftUpperY));
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -252,7 +252,7 @@
   // crop away everything that is either right of lRightLowerX or below lRightLowerY
   lImage.crop(Magick::Geometry(lRightLowerX, lRightLowerY));
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -274,7 +274,7 @@
   int lAngle = ImageFunction::getOneIntArg(aArgs, 1);
   lImage.rotate(lAngle%360);
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -296,7 +296,7 @@
   ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
   lImage.erase();
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -318,7 +318,7 @@
   ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
   lImage.flop();
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -339,7 +339,7 @@
   ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
   lImage.flip();
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -360,7 +360,7 @@
   ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
   lImage.trim();
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -401,7 +401,7 @@
   }     
 
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -426,7 +426,7 @@
   int  lSigma = ImageFunction::getOneIntArg(aArgs, 2);
   lImage.blur(lRadius, lSigma);
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
 
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
@@ -450,7 +450,7 @@
   ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
   lImage.despeckle();
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -471,7 +471,7 @@
   ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
   lImage.enhance();
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -493,7 +493,7 @@
   ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
   lImage.equalize();
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -513,11 +513,10 @@
 
   Magick::Image lImage;
   ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
-  Item lItem;   
   // check if second argument was given
   lImage.edge(ImageFunction::getOneUnsignedIntArg(aArgs,1));
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -541,7 +540,7 @@
   ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
   lImage.charcoal(lRadius, lSigma);
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -566,7 +565,7 @@
   ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
   lImage.emboss(lRadius, lSigma);
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -590,7 +589,7 @@
   ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
   lImage.solarize(lFactor);
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -618,7 +617,7 @@
   }
   lFirstImage.stereo(lSecondImage);
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lFirstImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -653,7 +652,7 @@
   sscanf(lTmpString.substr(5,2).c_str(), "%x", &lBlue);
   lImage.transparent(Magick::ColorRGB((double)lRed/255.0, (double)lGreen/255.0, (double)lBlue/255.0));
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true);
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -676,7 +675,7 @@
   ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
   lImage.swirl(lDegrees);
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -699,7 +698,7 @@
   ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
   lImage.reduceNoise(lOrder);
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -723,7 +722,7 @@
   ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
   lImage.contrast(lSharpen);
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -741,7 +740,6 @@
   const StaticContext*                          aSctxCtx,
   const DynamicContext*                         aDynCtx) const
 {
-  Item lItem;
   Magick::Image lImage;
   ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
   // check if the one gamma value version was called or the version with seperate values for r g and b. Doing this by looking if the 3. argument exists.
@@ -755,7 +753,7 @@
     lImage.gamma(lGamma);
   } 
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -778,7 +776,7 @@
   ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
   lImage.implode(lFactor);
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -802,7 +800,7 @@
   ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
   lImage.oilPaint(lRadius);
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -826,7 +824,7 @@
   ImageFunction::getOneImageArg(aDynCtx, aArgs, 1, lImage);
   lImage.stegano(lWatermark);
   String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 }
@@ -847,3 +845,5 @@
 extern "C" DLL_EXPORT zorba::ExternalModule* createModule() {
   return new zorba::imagemodule::manipulationmodule::ManipulationModule();
 }
+
+/* vim:set et sw=2 ts=2: */

=== modified file 'src/com/zorba-xquery/www/modules/image/paint.xq.src/paint.cpp'
--- src/com/zorba-xquery/www/modules/image/paint.xq.src/paint.cpp	2011-10-06 08:18:47 +0000
+++ src/com/zorba-xquery/www/modules/image/paint.xq.src/paint.cpp	2013-06-22 13:12:26 +0000
@@ -60,7 +60,7 @@
 
   // pass the blob back as base64Binary ...
   String lEncodedContent = ImageFunction::getEncodedStringFromBlob(lBlob);
-  Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
+  Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true));
   ImageFunction::checkIfItemIsNull(lItem);
   return ItemSequence_t(new SingletonItemSequence(lItem));
 

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to