Merge lp:~zorba-coders/zorba/bug-1158052-image into lp:zorba/image-module

Proposed by Paul J. Lucas on 2013-06-22
Status: Merged
Merged at revision: 57
Proposed branch: lp:~zorba-coders/zorba/bug-1158052-image
Merge into: lp:zorba/image-module
Diff against target: 381 lines (+41/-42)
4 files modified
src/com/zorba-xquery/www/modules/image/animation.xq.src/animation.cpp (+2/-2)
src/com/zorba-xquery/www/modules/image/basic.xq.src/basic.cpp (+5/-6)
src/com/zorba-xquery/www/modules/image/manipulation.xq.src/manipulation.cpp (+33/-33)
src/com/zorba-xquery/www/modules/image/paint.xq.src/paint.cpp (+1/-1)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-1158052-image
Reviewer Review Type Date Requested Status
Chris Hillery 2013-06-22 Approve on 2013-06-28
Paul J. Lucas Approve on 2013-06-22
Review via email: mp+170946@code.launchpad.net

Commit message

Corresponding changes for bug #1158052.

Description of the change

Corresponding changes for bug #1158052.

To post a comment you must log in.
Paul J. Lucas (paul-lucas) :
review: Approve
Chris Hillery (ceejatec) :
review: Approve
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue succeeded - proposal merged!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/com/zorba-xquery/www/modules/image/animation.xq.src/animation.cpp'
2--- src/com/zorba-xquery/www/modules/image/animation.xq.src/animation.cpp 2011-10-06 08:18:47 +0000
3+++ src/com/zorba-xquery/www/modules/image/animation.xq.src/animation.cpp 2013-06-22 13:12:26 +0000
4@@ -56,7 +56,7 @@
5 Magick::writeImages(lImageList.begin(), lImageList.end(), &lBlob, true);
6 String lEncodedContent = ImageFunction::getEncodedStringFromBlob(lBlob);
7
8- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
9+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
10 ImageFunction::checkIfItemIsNull(lItem);
11 return ItemSequence_t(new SingletonItemSequence(lItem));
12 }
13@@ -90,7 +90,7 @@
14 Magick::writeImages(lImageList.begin(), lImageList.end(), &lBlob, true);
15 String lEncodedContent = ImageFunction::getEncodedStringFromBlob(lBlob);
16
17- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
18+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
19 ImageFunction::checkIfItemIsNull(lItem);
20 return ItemSequence_t(new SingletonItemSequence(lItem));
21 }
22
23=== modified file 'src/com/zorba-xquery/www/modules/image/basic.xq.src/basic.cpp'
24--- src/com/zorba-xquery/www/modules/image/basic.xq.src/basic.cpp 2013-06-12 05:12:20 +0000
25+++ src/com/zorba-xquery/www/modules/image/basic.xq.src/basic.cpp 2013-06-22 13:12:26 +0000
26@@ -119,7 +119,7 @@
27 String lType = ImageFunction::getOneStringArg(aArgs, 1);
28 lImage.magick(lType.c_str());
29 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
30- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
31+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true));
32
33 ImageFunction::checkIfItemIsNull(lItem);
34 return ItemSequence_t(new SingletonItemSequence(lItem));
35@@ -150,7 +150,7 @@
36
37 lImage.magick(lType.c_str()); // Set output format
38 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
39- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
40+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
41
42 ImageFunction::checkIfItemIsNull(lItem);
43 return ItemSequence_t(new SingletonItemSequence(lItem));
44@@ -182,7 +182,7 @@
45 }
46 lImage.quality(lQuality); // Set output format
47 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
48- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
49+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true));
50 ImageFunction::checkIfItemIsNull(lItem);
51 return ItemSequence_t(new SingletonItemSequence(lItem));
52
53@@ -209,7 +209,7 @@
54 lBlankImage.magick(lType.c_str()); // Set output format
55
56 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lBlankImage);
57- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
58+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true));
59 ImageFunction::checkIfItemIsNull(lItem);
60 return ItemSequence_t(new SingletonItemSequence(lItem));
61
62@@ -285,5 +285,4 @@
63 return new zorba::imagemodule::basicmodule::BasicModule();
64 }
65
66-
67-
68+/* vim:set et sw=2 ts=2: */
69
70=== modified file 'src/com/zorba-xquery/www/modules/image/manipulation.xq.src/manipulation.cpp'
71--- src/com/zorba-xquery/www/modules/image/manipulation.xq.src/manipulation.cpp 2011-10-06 08:18:47 +0000
72+++ src/com/zorba-xquery/www/modules/image/manipulation.xq.src/manipulation.cpp 2013-06-22 13:12:26 +0000
73@@ -42,7 +42,7 @@
74 const unsigned int lNewHeight = ImageFunction::getOneUnsignedIntArg(aArgs, 2);
75 lImage.size(Magick::Geometry(lNewWidth, lNewHeight));
76 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
77- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
78+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
79 ImageFunction::checkIfItemIsNull(lItem);
80 return ItemSequence_t(new SingletonItemSequence(lItem));
81 }
82@@ -67,7 +67,7 @@
83 const unsigned int lRatio = lNewWidth/lImage.columns();
84 lImage.zoom(Magick::Geometry(lNewWidth, lImage.rows()*lRatio));
85 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
86- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
87+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true));
88 ImageFunction::checkIfItemIsNull(lItem);
89 return ItemSequence_t(new SingletonItemSequence(lItem));
90
91@@ -94,7 +94,7 @@
92 const unsigned int lRatio = lNewHeight / lImage.rows();
93 lImage.zoom(Magick::Geometry(lImage.columns()*lRatio, lNewHeight));
94 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
95- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
96+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
97 ImageFunction::checkIfItemIsNull(lItem);
98 return ItemSequence_t(new SingletonItemSequence(lItem));
99
100@@ -120,7 +120,7 @@
101 const double lRatio = ImageFunction::getOneDoubleArg(aArgs, 1);
102 lImage.zoom(Magick::Geometry(lImage.columns()*lRatio, lImage.rows()*lRatio));
103 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
104- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
105+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
106 ImageFunction::checkIfItemIsNull(lItem);
107 return ItemSequence_t(new SingletonItemSequence(lItem));
108 }
109@@ -149,7 +149,7 @@
110 // crop away everything that is either right of lRightLowerX or below lRightLowerY
111 lImage.crop(Magick::Geometry(lWidth, lHeight));
112 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
113- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
114+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
115 ImageFunction::checkIfItemIsNull(lItem);
116 return ItemSequence_t(new SingletonItemSequence(lItem));
117 }
118@@ -201,7 +201,7 @@
119 lImage.composite(lOverlayImage, lLeftUpperX, lLeftUpperY, Magick::BumpmapCompositeOp);
120 }
121 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
122- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
123+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
124 ImageFunction::checkIfItemIsNull(lItem);
125 return ItemSequence_t(new SingletonItemSequence(lItem));
126 }
127@@ -227,7 +227,7 @@
128 // chop away everything that is either left of lLeftUpperX or above lLeftUpperY
129 lImage.chop(Magick::Geometry(lLeftUpperX, lLeftUpperY));
130 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
131- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
132+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
133 ImageFunction::checkIfItemIsNull(lItem);
134 return ItemSequence_t(new SingletonItemSequence(lItem));
135 }
136@@ -252,7 +252,7 @@
137 // crop away everything that is either right of lRightLowerX or below lRightLowerY
138 lImage.crop(Magick::Geometry(lRightLowerX, lRightLowerY));
139 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
140- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
141+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
142 ImageFunction::checkIfItemIsNull(lItem);
143 return ItemSequence_t(new SingletonItemSequence(lItem));
144 }
145@@ -274,7 +274,7 @@
146 int lAngle = ImageFunction::getOneIntArg(aArgs, 1);
147 lImage.rotate(lAngle%360);
148 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
149- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
150+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
151 ImageFunction::checkIfItemIsNull(lItem);
152 return ItemSequence_t(new SingletonItemSequence(lItem));
153 }
154@@ -296,7 +296,7 @@
155 ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
156 lImage.erase();
157 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
158- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
159+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
160 ImageFunction::checkIfItemIsNull(lItem);
161 return ItemSequence_t(new SingletonItemSequence(lItem));
162 }
163@@ -318,7 +318,7 @@
164 ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
165 lImage.flop();
166 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
167- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
168+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
169 ImageFunction::checkIfItemIsNull(lItem);
170 return ItemSequence_t(new SingletonItemSequence(lItem));
171 }
172@@ -339,7 +339,7 @@
173 ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
174 lImage.flip();
175 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
176- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
177+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
178 ImageFunction::checkIfItemIsNull(lItem);
179 return ItemSequence_t(new SingletonItemSequence(lItem));
180 }
181@@ -360,7 +360,7 @@
182 ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
183 lImage.trim();
184 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
185- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
186+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
187 ImageFunction::checkIfItemIsNull(lItem);
188 return ItemSequence_t(new SingletonItemSequence(lItem));
189 }
190@@ -401,7 +401,7 @@
191 }
192
193 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
194- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
195+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
196 ImageFunction::checkIfItemIsNull(lItem);
197 return ItemSequence_t(new SingletonItemSequence(lItem));
198 }
199@@ -426,7 +426,7 @@
200 int lSigma = ImageFunction::getOneIntArg(aArgs, 2);
201 lImage.blur(lRadius, lSigma);
202 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
203- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
204+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
205
206 ImageFunction::checkIfItemIsNull(lItem);
207 return ItemSequence_t(new SingletonItemSequence(lItem));
208@@ -450,7 +450,7 @@
209 ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
210 lImage.despeckle();
211 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
212- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
213+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
214 ImageFunction::checkIfItemIsNull(lItem);
215 return ItemSequence_t(new SingletonItemSequence(lItem));
216 }
217@@ -471,7 +471,7 @@
218 ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
219 lImage.enhance();
220 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
221- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
222+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
223 ImageFunction::checkIfItemIsNull(lItem);
224 return ItemSequence_t(new SingletonItemSequence(lItem));
225 }
226@@ -493,7 +493,7 @@
227 ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
228 lImage.equalize();
229 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
230- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
231+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
232 ImageFunction::checkIfItemIsNull(lItem);
233 return ItemSequence_t(new SingletonItemSequence(lItem));
234 }
235@@ -513,11 +513,10 @@
236
237 Magick::Image lImage;
238 ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
239- Item lItem;
240 // check if second argument was given
241 lImage.edge(ImageFunction::getOneUnsignedIntArg(aArgs,1));
242 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
243- lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
244+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
245 ImageFunction::checkIfItemIsNull(lItem);
246 return ItemSequence_t(new SingletonItemSequence(lItem));
247 }
248@@ -541,7 +540,7 @@
249 ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
250 lImage.charcoal(lRadius, lSigma);
251 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
252- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
253+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
254 ImageFunction::checkIfItemIsNull(lItem);
255 return ItemSequence_t(new SingletonItemSequence(lItem));
256 }
257@@ -566,7 +565,7 @@
258 ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
259 lImage.emboss(lRadius, lSigma);
260 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
261- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
262+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
263 ImageFunction::checkIfItemIsNull(lItem);
264 return ItemSequence_t(new SingletonItemSequence(lItem));
265 }
266@@ -590,7 +589,7 @@
267 ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
268 lImage.solarize(lFactor);
269 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
270- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
271+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
272 ImageFunction::checkIfItemIsNull(lItem);
273 return ItemSequence_t(new SingletonItemSequence(lItem));
274 }
275@@ -618,7 +617,7 @@
276 }
277 lFirstImage.stereo(lSecondImage);
278 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lFirstImage);
279- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
280+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
281 ImageFunction::checkIfItemIsNull(lItem);
282 return ItemSequence_t(new SingletonItemSequence(lItem));
283 }
284@@ -653,7 +652,7 @@
285 sscanf(lTmpString.substr(5,2).c_str(), "%x", &lBlue);
286 lImage.transparent(Magick::ColorRGB((double)lRed/255.0, (double)lGreen/255.0, (double)lBlue/255.0));
287 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
288- lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
289+ lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true);
290 ImageFunction::checkIfItemIsNull(lItem);
291 return ItemSequence_t(new SingletonItemSequence(lItem));
292 }
293@@ -676,7 +675,7 @@
294 ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
295 lImage.swirl(lDegrees);
296 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
297- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
298+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
299 ImageFunction::checkIfItemIsNull(lItem);
300 return ItemSequence_t(new SingletonItemSequence(lItem));
301 }
302@@ -699,7 +698,7 @@
303 ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
304 lImage.reduceNoise(lOrder);
305 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
306- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
307+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
308 ImageFunction::checkIfItemIsNull(lItem);
309 return ItemSequence_t(new SingletonItemSequence(lItem));
310 }
311@@ -723,7 +722,7 @@
312 ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
313 lImage.contrast(lSharpen);
314 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
315- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
316+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
317 ImageFunction::checkIfItemIsNull(lItem);
318 return ItemSequence_t(new SingletonItemSequence(lItem));
319 }
320@@ -741,7 +740,6 @@
321 const StaticContext* aSctxCtx,
322 const DynamicContext* aDynCtx) const
323 {
324- Item lItem;
325 Magick::Image lImage;
326 ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
327 // 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.
328@@ -755,7 +753,7 @@
329 lImage.gamma(lGamma);
330 }
331 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
332- lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
333+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
334 ImageFunction::checkIfItemIsNull(lItem);
335 return ItemSequence_t(new SingletonItemSequence(lItem));
336 }
337@@ -778,7 +776,7 @@
338 ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
339 lImage.implode(lFactor);
340 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
341- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
342+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
343 ImageFunction::checkIfItemIsNull(lItem);
344 return ItemSequence_t(new SingletonItemSequence(lItem));
345 }
346@@ -802,7 +800,7 @@
347 ImageFunction::getOneImageArg(aDynCtx, aArgs, 0, lImage);
348 lImage.oilPaint(lRadius);
349 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
350- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
351+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
352 ImageFunction::checkIfItemIsNull(lItem);
353 return ItemSequence_t(new SingletonItemSequence(lItem));
354 }
355@@ -826,7 +824,7 @@
356 ImageFunction::getOneImageArg(aDynCtx, aArgs, 1, lImage);
357 lImage.stegano(lWatermark);
358 String lEncodedContent = ImageFunction::getEncodedStringFromImage(aDynCtx, lImage);
359- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
360+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true) );
361 ImageFunction::checkIfItemIsNull(lItem);
362 return ItemSequence_t(new SingletonItemSequence(lItem));
363 }
364@@ -847,3 +845,5 @@
365 extern "C" DLL_EXPORT zorba::ExternalModule* createModule() {
366 return new zorba::imagemodule::manipulationmodule::ManipulationModule();
367 }
368+
369+/* vim:set et sw=2 ts=2: */
370
371=== modified file 'src/com/zorba-xquery/www/modules/image/paint.xq.src/paint.cpp'
372--- src/com/zorba-xquery/www/modules/image/paint.xq.src/paint.cpp 2011-10-06 08:18:47 +0000
373+++ src/com/zorba-xquery/www/modules/image/paint.xq.src/paint.cpp 2013-06-22 13:12:26 +0000
374@@ -60,7 +60,7 @@
375
376 // pass the blob back as base64Binary ...
377 String lEncodedContent = ImageFunction::getEncodedStringFromBlob(lBlob);
378- Item lItem = theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size());
379+ Item lItem( theModule->getItemFactory()->createBase64Binary(lEncodedContent.c_str(), lEncodedContent.size(), true));
380 ImageFunction::checkIfItemIsNull(lItem);
381 return ItemSequence_t(new SingletonItemSequence(lItem));
382

Subscribers

People subscribed via source and target branches

to all changes: