zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #24981
[Merge] lp:~zorba-coders/zorba/bug-1210410-graphviz into lp:zorba/image-module
Chris Hillery has proposed merging lp:~zorba-coders/zorba/bug-1210410-graphviz into lp:zorba/image-module.
Commit message:
Updated options and annotations URIs to zorba.io.
Requested reviews:
Zorba Coders (zorba-coders)
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1210410-graphviz/+merge/179374
--
https://code.launchpad.net/~zorba-coders/zorba/bug-1210410-graphviz/+merge/179374
Your team Zorba Coders is requested to review the proposed merge of lp:~zorba-coders/zorba/bug-1210410-graphviz into lp:zorba/image-module.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2012-07-20 20:50:13 +0000
+++ CMakeLists.txt 2013-08-09 09:47:20 +0000
@@ -14,15 +14,19 @@
CMAKE_MINIMUM_REQUIRED (VERSION 2.6)
-PROJECT (zorba_image_module)
+PROJECT (zorba_graphviz_module)
ENABLE_TESTING ()
INCLUDE (CTest)
FIND_PACKAGE (Zorba REQUIRED HINTS "${ZORBA_BUILD_DIR}")
INCLUDE ("${Zorba_USE_FILE}")
+<<<<<<< TREE
SET_CMAKE_MODULE_PATH ()
+=======
+SET_CMAKE_MODULE_PATH ()
+>>>>>>> MERGE-SOURCE
ADD_SUBDIRECTORY ("src")
DONE_DECLARING_ZORBA_URIS ()
=== modified file 'src/com/zorba-xquery/www/modules/image/CMakeLists.txt'
--- src/com/zorba-xquery/www/modules/image/CMakeLists.txt 2012-10-29 20:36:25 +0000
+++ src/com/zorba-xquery/www/modules/image/CMakeLists.txt 2013-08-09 09:47:20 +0000
@@ -14,6 +14,7 @@
#
########################################################################
+<<<<<<< TREE
# ImageMagick
########################################################################
IF(ZORBA_SUPPRESS_ImageMagick)
@@ -84,3 +85,30 @@
ENDIF (ImageMagick_FOUND)
ENDIF(ZORBA_SUPPRESS_ImageMagick)
MESSAGE(STATUS "")
+=======
+# Graphviz
+########################################################################
+IF(ZORBA_SUPPRESS_GRAPHVIZ)
+ MESSAGE(STATUS "ZORBA_SUPPRESS_Graphviz is true - not searching for Graphviz.")
+ELSE (ZORBA_SUPPRESS_GRAPHVIZ)
+
+ MESSAGE (STATUS "Looking for Graphviz")
+ FIND_PACKAGE(Graphviz)
+
+ IF (GRAPHVIZ_FOUND)
+ MESSAGE(STATUS "Found Graphviz library -- "${GRAPHVIZ_LIBRARIES})
+
+ INCLUDE_DIRECTORIES(${GRAPHVIZ_INCLUDE_DIRS})
+ INCLUDE_DIRECTORIES("graphviz.xq.src")
+ DECLARE_ZORBA_MODULE (VERSION 1.0 FILE "graphviz.xq"
+ URI "http://www.zorba-xquery.com/modules/image/graphviz"
+ LINK_LIBRARIES "${GRAPHVIZ_LIBRARIES}")
+
+ ADD_TEST_DIRECTORY("${PROJECT_SOURCE_DIR}/test_graphviz")
+
+ ELSE (GRAPHVIZ_FOUND)
+ MESSAGE(STATUS "Graphviz library not found.")
+ ENDIF (GRAPHVIZ_FOUND)
+ENDIF (ZORBA_SUPPRESS_GRAPHVIZ)
+MESSAGE(STATUS "")
+>>>>>>> MERGE-SOURCE
=== renamed file 'src/com/zorba-xquery/www/modules/image/animation.xq' => 'src/com/zorba-xquery/www/modules/image/animation.xq.THIS'
=== renamed 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.THIS'
=== removed file 'src/com/zorba-xquery/www/modules/image/animation.xq.src/animation.h'
--- src/com/zorba-xquery/www/modules/image/animation.xq.src/animation.h 2011-10-06 08:18:47 +0000
+++ src/com/zorba-xquery/www/modules/image/animation.xq.src/animation.h 1970-01-01 00:00:00 +0000
@@ -1,73 +0,0 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef ZORBA_IMAGEMODULE_ANIMATIONMODULE_ANIMATION_H
-#define ZORBA_IMAGEMODULE_ANIMATIONMODULE_ANIMATION_H
-
-#include "image_function.h"
-
-namespace zorba {
-
- class ItemFactory;
- class SerializationItemProvider;
-
- namespace imagemodule { namespace animationmodule {
-
-
-
-//*****************************************************************************
-
-
-class CreateAnimatedGifFunction : public zorba::imagemodule::ImageFunction
- {
- public:
- CreateAnimatedGifFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "create-animated-gif"; }
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-
-
-//*****************************************************************************
-
-
-class CreateMorphedGifFunction : public zorba::imagemodule::ImageFunction
- {
- public:
- CreateMorphedGifFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "create-morphed-gif"; }
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-
-
-
-
-
-
-
-} /* namespace animationmodule */ } /* namespace imagemodule */ } /* namespace zorba */
-
-#endif /* ZORBA_IMAGEMODULE_ANIMATIONMODULE_ANIMATION_H */
=== removed file 'src/com/zorba-xquery/www/modules/image/animation.xq.src/animation_module.cpp'
--- src/com/zorba-xquery/www/modules/image/animation.xq.src/animation_module.cpp 2011-10-06 08:18:47 +0000
+++ src/com/zorba-xquery/www/modules/image/animation.xq.src/animation_module.cpp 1970-01-01 00:00:00 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "animation.h"
-#include "animation_module.h"
-
-namespace zorba { namespace imagemodule { namespace animationmodule {
-
-
-
-
-ExternalFunction*
-AnimationModule::getExternalFunction(const String& aLocalname)
-{
- ExternalFunction*& lFunc = theFunctions[aLocalname];
- if (!lFunc) {
- if (1 == 0) {
- } else if (aLocalname == "create-animated-gif") {
- lFunc = new CreateAnimatedGifFunction(this);
- } else if (aLocalname == "create-morphed-gif") {
- lFunc = new CreateMorphedGifFunction(this);
- }
- }
- return lFunc;
-}
-
-} /* namespace animationmodule */ } /* namespace imagemodule */ } /* namespace zorba */
=== removed file 'src/com/zorba-xquery/www/modules/image/animation.xq.src/animation_module.h'
--- src/com/zorba-xquery/www/modules/image/animation.xq.src/animation_module.h 2011-10-06 08:18:47 +0000
+++ src/com/zorba-xquery/www/modules/image/animation.xq.src/animation_module.h 1970-01-01 00:00:00 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ZORBA_IMAGEMODULE_ANIMATIONMODULE_BASICMODULE_H
-#define ZORBA_IMAGEMODULE_ANIMATIONMODULE_BASICMODULE_H
-
-#include <map>
-
-#include <zorba/zorba.h>
-#include <zorba/external_module.h>
-#include "image_module.h"
-
-namespace zorba { namespace imagemodule { namespace animationmodule {
-
-class AnimationModule : public ImageModule
-{
-
- virtual ExternalFunction*
- getExternalFunction(const String& aLocalname);
-
-
- virtual String
- getURI() const { return "http://www.zorba-xquery.com/modules/image/animation"; }
-
-};
-
-} /* namespace animationmodule */
-} /* namespace imagemodule */
-} /* namespace zorba */
-
-#endif /* ZORBA_IMAGEMODULE_ANIMATIONMODULE_BASICMODULE_H */
-
-/*
- * Local variables:
- * mode: c++
- * End:
- */
=== renamed file 'src/com/zorba-xquery/www/modules/image/basic.xq' => 'src/com/zorba-xquery/www/modules/image/basic.xq.THIS'
=== renamed 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.THIS'
=== removed file 'src/com/zorba-xquery/www/modules/image/basic.xq.src/basic.h'
--- src/com/zorba-xquery/www/modules/image/basic.xq.src/basic.h 2011-08-04 04:09:00 +0000
+++ src/com/zorba-xquery/www/modules/image/basic.xq.src/basic.h 1970-01-01 00:00:00 +0000
@@ -1,179 +0,0 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef ZORBA_IMAGEMODULE_BASICMODULE_BASIC_H
-#define ZORBA_IMAGEMODULE_BASICMODULE_BASIC_H
-
-#include "image_function.h"
-
-namespace zorba {
-
- class ItemFactory;
- class SerializationItemProvider;
-
- namespace imagemodule { namespace basicmodule {
-
-//*****************************************************************************
-
-class WidthFunction : public zorba::imagemodule::ImageFunction
-
- {
- public:
- WidthFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "width";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-
-//*****************************************************************************
-
-
-class HeightFunction : public zorba::imagemodule::ImageFunction
-
- {
- public:
- HeightFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "height";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-
-//*****************************************************************************
-
-
- class FormatFunction : public zorba::imagemodule::ImageFunction
- {
- public:
- FormatFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "format"; }
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-
-class ConvertFunction : public zorba::imagemodule::ImageFunction
- {
- public:
- ConvertFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "convert-impl"; }
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-
-class CompressFunction : public zorba::imagemodule::ImageFunction
- {
- public:
- CompressFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "compress"; }
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class CreateFunction : public zorba::imagemodule::ImageFunction
- {
- public:
- CreateFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "create-impl"; }
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class EqualsFunction : public zorba::imagemodule::ImageFunction
- {
- public:
- EqualsFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "equals"; }
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-
-
-//*****************************************************************************
-
-class ExifFunction : public zorba::imagemodule::ImageFunction
- {
- public:
- ExifFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "exif"; }
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-
-//*****************************************************************************
-
-class ConvertSVGFunction : public zorba::imagemodule::ImageFunction
- {
- public:
- ConvertSVGFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "convert-svg-impl"; }
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-
-
-
-} /* namespace basicmodule */ } /* namespace imagemodule */ } /* namespace zorba */
-
-#endif /* ZORBA_IMAGEMODULE_BASICMODULE_BASIC_H */
=== removed file 'src/com/zorba-xquery/www/modules/image/basic.xq.src/basic_module.cpp'
--- src/com/zorba-xquery/www/modules/image/basic.xq.src/basic_module.cpp 2011-08-04 04:09:00 +0000
+++ src/com/zorba-xquery/www/modules/image/basic.xq.src/basic_module.cpp 1970-01-01 00:00:00 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "basic.h"
-#include "basic_module.h"
-
-namespace zorba { namespace imagemodule { namespace basicmodule {
-
-
-ExternalFunction*
-BasicModule::getExternalFunction(const String& aLocalname)
-{
- ExternalFunction*& lFunc = theFunctions[aLocalname];
- if (!lFunc) {
- if (1 == 0) {
- } else if (aLocalname == "width") {
- lFunc = new WidthFunction(this);
- } else if (aLocalname == "height") {
- lFunc = new HeightFunction(this);
- } else if (aLocalname == "format") {
- lFunc = new FormatFunction(this);
- } else if (aLocalname == "convert-impl") {
- lFunc = new ConvertFunction(this);
- } else if (aLocalname == "compress") {
- lFunc = new CompressFunction(this);
- } else if (aLocalname == "create-impl") {
- lFunc = new CreateFunction(this);
- } else if (aLocalname == "equals") {
- lFunc = new EqualsFunction(this);
- } else if (aLocalname == "exif") {
- lFunc = new ExifFunction(this);
- } else if (aLocalname == "convert-svg-impl") {
- lFunc = new ConvertSVGFunction(this);
- }
- }
- return lFunc;
-}
-
-} /* namespace basicmodule */ } /* namespace imagemodule */ } /* namespace zorba */
=== removed file 'src/com/zorba-xquery/www/modules/image/basic.xq.src/basic_module.h'
--- src/com/zorba-xquery/www/modules/image/basic.xq.src/basic_module.h 2011-10-06 08:18:47 +0000
+++ src/com/zorba-xquery/www/modules/image/basic.xq.src/basic_module.h 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ZORBA_IMAGEMODULE_BASICMODULE_BASICMODULE_H
-#define ZORBA_IMAGEMODULE_BASICMODULE_BASICMODULE_H
-
-#include <map>
-
-#include <zorba/zorba.h>
-#include <zorba/external_module.h>
-#include "image_module.h"
-
-namespace zorba { namespace imagemodule { namespace basicmodule {
-
-class BasicModule : public ImageModule
-{
-
- virtual ExternalFunction*
- getExternalFunction(const String& aLocalname);
-
-
- virtual String
- getURI() const { return "http://www.zorba-xquery.com/modules/image/basic"; }
-
-};
-
-} /* namespace basicmodule */
-} /* namespace imagemodule */
-} /* namespace zorba */
-
-#endif /* ZORBA_IMAGEMODULE_BASICMODULE_BASICMODULE_H */
=== added file 'src/com/zorba-xquery/www/modules/image/graphviz.xq.OTHER'
--- src/com/zorba-xquery/www/modules/image/graphviz.xq.OTHER 1970-01-01 00:00:00 +0000
+++ src/com/zorba-xquery/www/modules/image/graphviz.xq.OTHER 2013-08-09 09:47:20 +0000
@@ -0,0 +1,82 @@
+xquery version "1.0";
+
+(:
+ : Copyright 2006-2009 The FLWOR Foundation.
+ :
+ : Licensed under the Apache License, Version 2.0 (the "License");
+ : you may not use this file except in compliance with the License.
+ : You may obtain a copy of the License at
+ :
+ : http://www.apache.org/licenses/LICENSE-2.0
+ :
+ : Unless required by applicable law or agreed to in writing, software
+ : distributed under the License is distributed on an "AS IS" BASIS,
+ : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ : See the License for the specific language governing permissions and
+ : limitations under the License.
+ :)
+
+(:~
+ : <p>Module that provides functions for generating SVG graphs.</p>
+ :
+ : <p>The module provides two function for generating graphs given in the :
+ : <ul><li>DOT language (see <a href="http://www.graphviz.org/">
+ : http://www.graphviz.org</a>)</li><li>or in the XML-based Graph eXchange
+ : Language (see <a href="http://www.gupro.de/GXL/">http://www.gupro.de/GXL/</a>),
+ : respectively.</li></ul>
+ : Both functions use the Graphviz Visualization Library in order to
+ : layout and render the graphs. As a result, both return a sequence
+ : of (document)-nodes (one for each input graph).
+ : These nodes are instances of the Scalable Vector Graphics (SVG) format.
+ : SVG is a language for describing two-dimensional graphics and
+ : graphical applications in XML. More information about SVG can
+ : be found at <a href="http://www.w3.org/Graphics/SVG/">http://www.w3.org/Graphics/SVG/</a>.
+ : As second parameters, both functions take a sequence of strings that
+ : are parameters for the graph generation and rendering algorithms.
+ : Currently, only the empty-sequence is allowed here.
+ : These parameters exist for future use.</p>
+ : <p>Please note that this feature is only available on Unix-based
+ : platforms (i.e. not on Windows).</p>
+ :
+ : @author <a href="http://www.28msec.com/home/index">28msec</a>
+ : @library <a href="http://www.graphviz.org/">Graphviz - Graph Visualization Software</a>
+ : @project Zorba/Image/Graphviz
+ :)
+module namespace gr = "http://www.zorba-xquery.com/modules/image/graphviz";
+
+declare namespace ver = "http://zorba.io/options/versioning";
+declare option ver:module-version "1.0";
+
+(:~
+ : Layout one ore more graphs given in the DOT language and render
+ : them as SVG. For example,
+ :
+ : <p><code>
+ : dot("digraph mygraph { p -> q }", ())
+ : </code></p>
+ :
+ : @param $dot A dot description of the graph to render.
+ : @param $params Parameters to configure the layout and rendering
+ : process. Currently, only the empty-sequence is allowed here.
+ : @return A graph for each item in the sequence given using the first
+ : parameter. The result sequence consists of items which are
+ : instance of the SVG data model.
+ :)
+declare function gr:dot(
+ $dot as xs:string*,
+ $params as xs:string*) as node()* external;
+
+(:~
+ : Layout one ore more graphs given in the GXL language and render
+ : them as SVG.
+ :
+ : @param $gxl A GXL description of the graph to render.
+ : @param $params Parameters to configure the layout and rendering
+ : process. Currently, only the empty-sequence is allowed here.
+ : @return A graph for each item in the sequence given using the first
+ : parameter. The result sequence consists of items which are
+ : instance of the SVG data model.
+ :)
+declare function gr:gxl(
+ $gxl as node()*,
+ $params as xs:string*) as node()* external;
=== removed file 'src/com/zorba-xquery/www/modules/image/image.xsd'
--- src/com/zorba-xquery/www/modules/image/image.xsd 2011-08-07 00:38:36 +0000
+++ src/com/zorba-xquery/www/modules/image/image.xsd 1970-01-01 00:00:00 +0000
@@ -1,277 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<schema
- xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.zorba-xquery.com/modules/image/image"
- xmlns:image="http://www.zorba-xquery.com/modules/image/image"
- elementFormDefault="qualified">
-
-<!--
-:: Copyright 2006-2008 The FLWOR Foundation.
-::
-:: Licensed under the Apache License, Version 2.0 (the "License");
-:: you may not use this file except in compliance with the License.
-:: You may obtain a copy of the License at
-::
-:: http://www.apache.org/licenses/LICENSE-2.0
-::
-:: Unless required by applicable law or agreed to in writing, software
-:: distributed under the License is distributed on an "AS IS" BASIS,
-:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-:: See the License for the specific language governing permissions and
-:: limitations under the License.
-::
--->
-
- <annotation xml:lang="en">
- <documentation>
- This schema defines the different types used in the modules under:
- http://www.zorba-xquery.com/modules/images/
- </documentation>
- </annotation>
-
- <simpleType name="imageFormat">
- <annotation xml:lang="en">
- <documentation>
- Fully supported image formats.
- </documentation>
- </annotation>
- <restriction base="string">
- <enumeration value="GIF"/>
- <enumeration value="PNG"/>
- <enumeration value="JPEG"/>
- <enumeration value="TIFF"/>
- <enumeration value="BMP"/>
- </restriction>
- </simpleType>
-
-
-
-
- <simpleType name="colorType">
- <annotation xml:lang="en">
- <documentation>
- This type defines how colors should be formatted.
- </documentation>
- </annotation>
- <restriction base="string">
- <length value="7"/>
- <pattern value="[#]([A-F0-9]{6})"/>
- </restriction>
- </simpleType>
-
- <simpleType name="noiseType">
- <annotation xml:lang="en">
- <documentation>
- This type defines the different names that are allowed as noise identifiers.
- </documentation>
- </annotation>
- <restriction base="string">
- <enumeration value="UniformNoise"/>
- <enumeration value="GaussianNoise"/>
- <enumeration value="MultiplicativeGaussianNoise"/>
- <enumeration value="ImpulseNoise"/>
- <enumeration value="LaplacianNoise"/>
- <enumeration value="PoissonNoise"/>
- </restriction>
- </simpleType>
-
-
- <simpleType name="compositeOperatorType">
- <annotation xml:lang="en">
- <documentation>
- This type defines the different operators applicable for overlaying images.
- OverCompositeOp: The result is the union of the the two image shapes with the composite image obscuring image in the region of overlap.
- InCompositeOp: The result is a simply composite image cut by the shape of image. None of the image data of image is included in the result.
- OutCompositeOp: The resulting image is composite image with the shape of image cut out.
- AtopCompositeOp: The result is the same shape as image image, with composite image obscuring image there the image shapes overlap. Note that this differs from OverCompositeOp because the portion of composite image outside of image's shape does not appear in the result.
- XorCompositeOp: The result is the image data from both composite image and image that is outside the overlap region. The overlap region will be blank.
- PlusCompositeOp: The result is just the sum of the image data. Output values are cropped to 255 (no overflow). This operation is independent of the matte channels.
- MinusCompositeOp: The result of composite image - image, with overflow cropped to zero. The matte chanel is ignored (set to 255, full coverage).
- AddCompositeOp: The result of composite image + image, with overflow wrapping around (mod 256).
- SubtractCompositeOp: The result of composite image - image, with underflow wrapping around (mod 256). The add and subtract operators can be used to perform reverible transformations.
- DifferenceCompositeOp: The result of abs(composite image - image). This is useful for comparing two very similar images.
- BumpmapCompositeOp: The result image shaded by composite image.
- </documentation>
- </annotation>
- <restriction base="string">
- <enumeration value="OverCompositeOp"/>
- <enumeration value="InCompositeOp"/>
- <enumeration value="OutCompositeOp"/>
- <enumeration value="AtopCompositeOp"/>
- <enumeration value="XorCompositeOp"/>
- <enumeration value="PlusCompositeOp"/>
- <enumeration value="MinusCompositeOp"/>
- <enumeration value="AddCompositeOp"/>
- <enumeration value="SubtractCompositeOp"/>
- <enumeration value="DifferenceCompositeOp"/>
- <enumeration value="BumpmapCompositeOp"/>
- </restriction>
- </simpleType>
-
-
-
- <complexType name="pointType">
- <sequence>
- <element name="x" type="double"/>
- <element name="y" type="double"/>
- </sequence>
- </complexType>
-
- <complexType name="paintableType" >
- <sequence>
- <element name="strokeWidth" type="double" minOccurs="0" maxOccurs="1"/>
- <element name="strokeColor" type="image:colorType" minOccurs="0" maxOccurs="1"/>
- <element name="fillColor" type="image:colorType" minOccurs="0" maxOccurs="1"/>
- <element name="antiAliasing" type="boolean" minOccurs="0" maxOccurs="1"/>
- </sequence>
- </complexType>
-
-
- <element name="paintable" type="image:paintableType" />
-
- <element name="line">
- <complexType>
- <complexContent>
- <extension base="image:paintableType">
- <sequence>
- <element name="start" type="image:pointType"/>
- <element name="end" type="image:pointType" />
- </sequence>
- </extension>
- </complexContent>
- </complexType>
- </element>
-
- <element name="polyLine">
- <complexType>
- <complexContent>
- <extension base="image:paintableType">
- <sequence>
- <element name="point" type="image:pointType" minOccurs="3" maxOccurs="unbounded" />
- </sequence>
- </extension>
- </complexContent>
- </complexType>
- </element>
-
- <element name="strokedPolyLine">
- <complexType>
- <complexContent>
- <extension base="image:paintableType">
- <sequence>
- <element name="point" type="image:pointType" minOccurs="3" maxOccurs="unbounded" />
- <element name="strokeLength" type="double" />
- <element name="gapLength" type="double" />
- </sequence>
- </extension>
- </complexContent>
- </complexType>
- </element>
-
-
- <element name="rectangle">
- <complexType>
- <complexContent>
- <extension base="image:paintableType">
- <sequence>
- <element name="upperLeft" type="image:pointType" />
- <element name="lowerRight" type="image:pointType" />
- </sequence>
- </extension>
- </complexContent>
- </complexType>
- </element>
-
- <element name="roundedRectangle">
- <complexType>
- <complexContent>
- <extension base="image:paintableType">
- <sequence>
- <element name="upperLeft" type="image:pointType" />
- <element name="lowerRight" type="image:pointType" />
- <element name="cornerWidth" type="double"/>
- <element name="cornerHeight" type="double"/>
- </sequence>
- </extension>
- </complexContent>
- </complexType>
- </element>
-
- <element name="circle">
- <complexType>
- <complexContent>
- <extension base="image:paintableType">
- <sequence>
- <element name="origin" type="image:pointType"/>
- <element name="perimeter" type="double"/>
- </sequence>
- </extension>
- </complexContent>
- </complexType>
- </element>
-
- <element name="ellipse">
- <complexType>
- <complexContent>
- <extension base="image:paintableType">
- <sequence>
- <element name="origin" type="image:pointType"/>
- <element name="perimeterX" type="double" />
- <element name="perimeterY" type="double" />
- </sequence>
- </extension>
- </complexContent>
- </complexType>
- </element>
-
-
- <element name="arc">
- <complexType>
- <complexContent>
- <extension base="image:paintableType">
- <sequence>
- <element name="origin" type="image:pointType"/>
- <element name="perimeterX" type="double" />
- <element name="perimeterY" type="double" />
- <element name="startDegrees" type="double"/>
- <element name="endDegrees" type="double" />
- </sequence>
- </extension>
- </complexContent>
- </complexType>
- </element>
-
- <element name="polygon">
- <complexType>
- <complexContent>
- <extension base="image:paintableType">
- <sequence>
- <element name="point" type="image:pointType" minOccurs="3" maxOccurs="unbounded" />
- </sequence>
- </extension>
- </complexContent>
- </complexType>
-
- </element>
-
- <element name="text">
- <complexType>
- <complexContent>
- <extension base="image:paintableType">
- <sequence>
- <element name="origin" type="image:pointType"/>
- <element name="text" type="string"/>
- <element name="font" type="string"/>
- <element name="font-size" type="double"/>
- </sequence>
- </extension>
- </complexContent>
- </complexType>
- </element>
-
-
-
-
-
-</schema>
-
=== renamed file 'src/com/zorba-xquery/www/modules/image/image_commons/image_function.cpp' => 'src/com/zorba-xquery/www/modules/image/image_commons/image_function.cpp.THIS'
=== renamed file 'src/com/zorba-xquery/www/modules/image/image_commons/image_function.h' => 'src/com/zorba-xquery/www/modules/image/image_commons/image_function.h.THIS'
=== renamed file 'src/com/zorba-xquery/www/modules/image/image_commons/image_module.cpp' => 'src/com/zorba-xquery/www/modules/image/image_commons/image_module.cpp.THIS'
=== renamed file 'src/com/zorba-xquery/www/modules/image/image_commons/image_module.h' => 'src/com/zorba-xquery/www/modules/image/image_commons/image_module.h.THIS'
=== removed directory 'src/com/zorba-xquery/www/modules/image/image_draw'
=== removed file 'src/com/zorba-xquery/www/modules/image/image_draw/draw_in_c.cpp'
--- src/com/zorba-xquery/www/modules/image/image_draw/draw_in_c.cpp 2011-08-05 02:22:16 +0000
+++ src/com/zorba-xquery/www/modules/image/image_draw/draw_in_c.cpp 1970-01-01 00:00:00 +0000
@@ -1,248 +0,0 @@
-/*
- * Copyright 2006-2011 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "draw_in_c.h"
-#include <wand/MagickWand.h>
-
-void *
-DrawPolygon(const void* aBlob,
- long* aLength,
- double aXValues[],
- double aYValues[],
- int aNumberOfPoints,
- std::string& aStrokeColor,
- std::string& aFillColor,
- double aStrokeWidth,
- bool aAntiAliasing) {
-
- MagickWandGenesis();
- MagickWand * lMagickWand = NewMagickWand();
- const size_t lLength = (size_t) *aLength;
- MagickReadImageBlob(lMagickWand, aBlob, lLength);
- DrawingWand * lDrawingWand = NewDrawingWand();
- PixelWand * lPixelWand = NewPixelWand();
-
- PushDrawingWand(lDrawingWand);
- PixelSetColor(lPixelWand, aStrokeColor.c_str());
- DrawSetStrokeColor(lDrawingWand, lPixelWand);
-
- if (aFillColor.compare("opaque") == 0) {
- DrawSetFillOpacity(lDrawingWand, 0);
- } else {
- PixelSetColor(lPixelWand, aFillColor.c_str());
- DrawSetFillColor(lDrawingWand, lPixelWand);
- }
- if (aAntiAliasing) {
- DrawSetStrokeAntialias(lDrawingWand, MagickTrue);
- } else {
- DrawSetStrokeAntialias(lDrawingWand, MagickFalse);
- }
- DrawSetStrokeWidth(lDrawingWand, aStrokeWidth);
-
- ZorbaArrayAutoPointer<PointInfo> lPoints (new PointInfo[aNumberOfPoints]);
-
- for (int i = 0; i < aNumberOfPoints; i++) {
- (lPoints.get())[i].x = aXValues[i];
- (lPoints.get())[i].y = aYValues[i];
- }
- DrawPolygon(lDrawingWand, aNumberOfPoints, lPoints.get());
- PopDrawingWand(lDrawingWand);
- MagickDrawImage(lMagickWand, lDrawingWand);
- size_t lBlobLength;
- void *lResultPointer;
- lResultPointer = (void *) MagickGetImageBlob(lMagickWand, &lBlobLength);
- *aLength = (long) lBlobLength;
- return lResultPointer;
-}
-
-void *
-DrawPolyLine(const void* aBlob,
- long* aLength,
- double aXValues[],
- double aYValues[],
- int aNumberOfPoints,
- std::string& aStrokeColor,
- double aStrokeWidth,
- bool aAntiAliasing,
- double aStrokeArray[],
- int aNumberOfStrokeValues)
-{
- MagickWandGenesis();
- MagickWand * lMagickWand = NewMagickWand();
- const size_t lLength = (size_t) *aLength;
- MagickReadImageBlob(lMagickWand, aBlob, lLength);
- DrawingWand * lDrawingWand = NewDrawingWand();
- PixelWand * lPixelWand = NewPixelWand();
-
- PushDrawingWand(lDrawingWand);
- PixelSetColor(lPixelWand, aStrokeColor.c_str());
- DrawSetStrokeColor(lDrawingWand, lPixelWand);
-
- // set fill opacity to 0 as we don't want Polylines to be filled ...
- DrawSetFillOpacity(lDrawingWand, 0.0);
-
- if (aAntiAliasing) {
- DrawSetStrokeAntialias(lDrawingWand, MagickTrue);
- } else {
- DrawSetStrokeAntialias(lDrawingWand, MagickFalse);
- }
- DrawSetStrokeWidth(lDrawingWand, aStrokeWidth);
-
- ZorbaArrayAutoPointer<PointInfo> lPoints (new PointInfo[aNumberOfPoints]);
-
- for (int i = 0; i < aNumberOfPoints; i++) {
- (lPoints.get())[i].x = aXValues[i];
- (lPoints.get())[i].y = aYValues[i];
- }
- if (aNumberOfStrokeValues > 0) {
- DrawSetStrokeDashArray(lDrawingWand, aNumberOfStrokeValues, aStrokeArray);
- }
-
- DrawPolyline(lDrawingWand, aNumberOfPoints, lPoints.get());
- PopDrawingWand(lDrawingWand);
- MagickDrawImage(lMagickWand, lDrawingWand);
- size_t lBlobLength;
- void *lResultPointer;
- lResultPointer = (void *) MagickGetImageBlob(lMagickWand, &lBlobLength);
- *aLength = (long) lBlobLength;
- return lResultPointer;
-
-}
-
-void *
-DrawRoundedRect(const void* aBlob,
- long* aLength,
- double aUpperLeftX ,
- double aUpperLeftY,
- double aLowerRightX,
- double aLowerRightY,
- double aCornerWidth,
- double aCornerHeight,
- std::string& aStrokeColor,
- std::string& aFillColor,
- double aStrokeWidth,
- bool aAntiAliasing)
-{
- MagickWandGenesis();
- MagickWand * lMagickWand = NewMagickWand();
- const size_t lLength = (size_t) *aLength;
- MagickReadImageBlob(lMagickWand, aBlob, lLength);
- DrawingWand * lDrawingWand = NewDrawingWand();
- PixelWand * lPixelWand = NewPixelWand();
-
- PushDrawingWand(lDrawingWand);
- PixelSetColor(lPixelWand, aStrokeColor.c_str());
- DrawSetStrokeColor(lDrawingWand, lPixelWand);
-
- if (aFillColor.compare("opaque") == 0) {
- DrawSetFillOpacity(lDrawingWand, 0);
- } else {
- PixelSetColor(lPixelWand, aFillColor.c_str());
- DrawSetFillColor(lDrawingWand, lPixelWand);
- }
-
- if (aAntiAliasing) {
- DrawSetStrokeAntialias(lDrawingWand, MagickTrue);
- } else {
- DrawSetStrokeAntialias(lDrawingWand, MagickFalse);
- }
- DrawSetStrokeWidth(lDrawingWand, aStrokeWidth);
-
- if ((aCornerWidth <= 0) || (aCornerHeight <= 0)) {
- DrawRectangle(lDrawingWand, aUpperLeftX, aUpperLeftY, aLowerRightX, aLowerRightY);
- } else {
- DrawRoundRectangle(lDrawingWand, aUpperLeftX, aUpperLeftY, aLowerRightX, aLowerRightY, aCornerWidth, aCornerHeight);
- }
- PopDrawingWand(lDrawingWand);
- MagickDrawImage(lMagickWand, lDrawingWand);
- size_t lBlobLength;
- void *lResultPointer;
- lResultPointer = (void *) MagickGetImageBlob(lMagickWand, &lBlobLength);
- *aLength = (long) lBlobLength;
- return lResultPointer;
-
-}
-
-void *
-DrawText(const void* aBlob,
- long* aLength,
- const char* aText,
- double aX,
- double aY,
- const char* aFont,
- double aFontSize,
- const char* aColor) {
- MagickWandGenesis();
- MagickWand * lMagickWand = NewMagickWand();
- const size_t lLength = (size_t) *aLength;
- MagickReadImageBlob(lMagickWand, aBlob, lLength);
- DrawingWand * lDrawingWand = NewDrawingWand();
- PixelWand * lPixelWand = NewPixelWand();
-
- PushDrawingWand(lDrawingWand);
- PixelSetColor(lPixelWand, aColor);
- DrawSetStrokeColor(lDrawingWand, lPixelWand);
- DrawSetFillColor(lDrawingWand, lPixelWand);
- DrawSetFont(lDrawingWand, aFont);
- DrawSetFontSize(lDrawingWand, aFontSize);
-
- DrawAnnotation(lDrawingWand, aX, aY, reinterpret_cast<const unsigned char *>(aText));
-
- PopDrawingWand(lDrawingWand);
-
-
- MagickDrawImage(lMagickWand, lDrawingWand);
- size_t lBlobLength;
- void *lResultPointer;
- lResultPointer = (void *) MagickGetImageBlob(lMagickWand, &lBlobLength);
- *aLength = (long) lBlobLength;
- return lResultPointer;
-
-
-}
-
-
-std::string
-GetImageType(const void* aBlob,
- long* aLength) {
- MagickWandGenesis();
- MagickWand * lMagickWand = NewMagickWand();
- const size_t lLength = (size_t) *aLength;
- MagickReadImageBlob(lMagickWand, aBlob, lLength);
- std::string lResult = MagickGetImageFormat(lMagickWand);
- return lResult;
-}
-
-
-
-std::string
-GetExifValue(const void* aBlob,
- long* aLength,
- std::string& aExifTag) {
- MagickWandGenesis();
- MagickWand * lMagickWand = NewMagickWand();
- const size_t lLength = (size_t) *aLength;
- MagickReadImageBlob(lMagickWand, aBlob, lLength);
- char * lResult = MagickGetImageProperty(lMagickWand, aExifTag.c_str());
- if (lResult == NULL) {
- std::string lNothing("");
- return lNothing;
- }
- std::string lStringResult (lResult);
- return lStringResult;
-}
-
-
=== removed file 'src/com/zorba-xquery/www/modules/image/image_draw/draw_in_c.h'
--- src/com/zorba-xquery/www/modules/image/image_draw/draw_in_c.h 2011-08-05 02:22:16 +0000
+++ src/com/zorba-xquery/www/modules/image/image_draw/draw_in_c.h 1970-01-01 00:00:00 +0000
@@ -1,115 +0,0 @@
-/*
- * Copyright 2006-2011 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <string>
-
-
-void *
-DrawPolygon(const void* aBlob,
- long* aLength,
- double aXValues[],
- double aYValues[],
- int aNumberOfPoints,
- std::string& aStrokeColor,
- std::string& aFillColor,
- double aStrokeWidth,
- bool aAntiAliasing);
-
-void *
-DrawPolyLine(const void* aBlob,
- long* aLength,
- double aXValues[],
- double aYValues[],
- int aNumberOfPoints,
- std::string& aStrokeColor,
- double aStrokeWidth,
- bool aAntiAliasing,
- double aStrokeArray[],
- int aNumberOfStrokeValues);
-
-
-void *
-DrawRoundedRect(const void* aBlob,
- long *aLength,
- double aUpperLeftX,
- double aUpperLeftY,
- double aLowerRightX,
- double aLowerRightY,
- double aCornerWidth,
- double aCornerHeight,
- std::string& aStrokeColor,
- std::string& aFillColor,
- double aStrokeWidth,
- bool aAntiAliasing);
-
-
-void *
-DrawText(const void* aBlob,
- long* aLength,
- const char* aText,
- double aX,
- double aY,
- const char* aFont,
- double aFontSize,
- const char* aColor);
-
-std::string
-GetImageType(const void* aBlob, long* aLength);
-
-std::string
-GetExifValue(const void* aBlob, long* aLength, std::string& aExifTag);
-
-
-template<class T>
- class ZorbaArrayAutoPointer
- {
- private:
- T* thePtr;
-
- public:
- ZorbaArrayAutoPointer(): thePtr(0){}
- explicit ZorbaArrayAutoPointer(T *aPtr): thePtr(aPtr){}
-
- ~ZorbaArrayAutoPointer()
- {
- delete[] thePtr;
- }
-
- void reset(T *aPtr)
- {
- T* lPtr = thePtr;
- thePtr = aPtr;
- if(thePtr != 0)
- {
- delete[] lPtr;
- }
- }
-
- T* get() const
- {
- return thePtr;
- }
- T* release()
- {
- T* lPtr = thePtr;
- thePtr = 0;
- return lPtr;
- }
- T operator[](unsigned int anIndex) const
- {
- return thePtr[anIndex];
- }
- };
=== renamed file 'src/com/zorba-xquery/www/modules/image/manipulation.xq' => 'src/com/zorba-xquery/www/modules/image/manipulation.xq.THIS'
=== renamed 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.THIS'
=== removed file 'src/com/zorba-xquery/www/modules/image/manipulation.xq.src/manipulation.h'
--- src/com/zorba-xquery/www/modules/image/manipulation.xq.src/manipulation.h 2011-10-06 08:18:47 +0000
+++ src/com/zorba-xquery/www/modules/image/manipulation.xq.src/manipulation.h 1970-01-01 00:00:00 +0000
@@ -1,532 +0,0 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef ZORBA_IMAGEMODULE_MANIPULATIONMODULE_MANIPULATION_H
-#define ZORBA_IMAGEMODULE_MANIPULATIONMODULE_MANIPULATION_H
-
-#include "image_function.h"
-
-namespace zorba {
-
- class ItemFactory;
- class SerializationItemProvider;
-
- namespace imagemodule { namespace manipulationmodule {
-
-
-
-//*****************************************************************************
-
-class ResizeFunction : public ImageFunction
- {
- public:
- ResizeFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "resize"; }
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-
-class ZoomByWidthFunction : public ImageFunction
- {
- public:
- ZoomByWidthFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "zoom-by-width"; }
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-
-class ZoomByHeightFunction : public ImageFunction
-
- {
- public:
- ZoomByHeightFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "zoom-by-height"; }
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-
-class ZoomFunction : public ImageFunction
-
- {
- public:
- ZoomFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "zoom";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class SubImageFunction : public ImageFunction
-
- {
- public:
- SubImageFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "sub-image";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class OverlayFunction : public ImageFunction
-
- {
- public:
- OverlayFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "overlay-impl";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class ChopFunction : public ImageFunction
-
- {
- public:
- ChopFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "chop";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class CropFunction : public ImageFunction
-
- {
- public:
- CropFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "crop";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class RotateFunction : public ImageFunction
-
- {
- public:
- RotateFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "rotate";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class EraseFunction : public ImageFunction
-
- {
- public:
- EraseFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "erase";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
-
- };
-
-//*****************************************************************************
-
-class FlopFunction : public ImageFunction
-
- {
- public:
- FlopFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "flop";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class FlipFunction : public ImageFunction
-
- {
- public:
- FlipFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "flip";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class TrimFunction : public ImageFunction
-
- {
- public:
- TrimFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "trim";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class AddNoiseFunction : public ImageFunction
-
- {
- public:
- AddNoiseFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "add-noise-impl";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class BlurFunction : public ImageFunction
-
- {
- public:
- BlurFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "blur";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class DespeckleFunction : public ImageFunction
-
- {
- public:
- DespeckleFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "despeckle";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class EnhanceFunction : public ImageFunction
-
- {
- public:
- EnhanceFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "enhance";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class EqualizeFunction : public ImageFunction
-
- {
- public:
- EqualizeFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "equalize";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class EdgeFunction : public ImageFunction
-
- {
- public:
- EdgeFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "edge";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class CharcoalFunction : public ImageFunction
-
- {
- public:
- CharcoalFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "charcoal";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class EmbossFunction : public ImageFunction
-
- {
- public:
- EmbossFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "emboss";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class SolarizeFunction : public ImageFunction
-
- {
- public:
- SolarizeFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "solarize";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class StereoFunction : public ImageFunction
-
- {
- public:
- StereoFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "stereo";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class TransparentFunction : public ImageFunction
-
- {
- public:
- TransparentFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "transparent-impl";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class SwirlFunction : public ImageFunction
-
- {
- public:
- SwirlFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "swirl";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class ReduceNoiseFunction : public ImageFunction
-
- {
- public:
- ReduceNoiseFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "reduce-noise";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class ContrastFunction : public ImageFunction
-
- {
- public:
- ContrastFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "contrast";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class GammaFunction : public ImageFunction
-
- {
- public:
- GammaFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "gamma";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-
-//*****************************************************************************
-
-class ImplodeFunction : public ImageFunction
-
- {
- public:
- ImplodeFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "implode";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class OilPaintFunction : public ImageFunction
-
- {
- public:
- OilPaintFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "oil-paint";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-//*****************************************************************************
-
-class WaterMarkFunction : public ImageFunction
-
- {
- public:
- WaterMarkFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "watermark";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- };
-
-
-} /* namespace manipulationmodule */ } /* namespace imagemodule */ } /* namespace zorba */
-
-#endif /* ZORBA_IMAGEMODULE_MANIPULATIONMODULE_MANIPULATION_H */
=== removed file 'src/com/zorba-xquery/www/modules/image/manipulation.xq.src/manipulation_module.cpp'
--- src/com/zorba-xquery/www/modules/image/manipulation.xq.src/manipulation_module.cpp 2011-10-06 08:18:47 +0000
+++ src/com/zorba-xquery/www/modules/image/manipulation.xq.src/manipulation_module.cpp 1970-01-01 00:00:00 +0000
@@ -1,98 +0,0 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "manipulation.h"
-#include "manipulation_module.h"
-
-namespace zorba { namespace imagemodule { namespace manipulationmodule {
-
-
-
-ExternalFunction*
-ManipulationModule::getExternalFunction(const String& aLocalname)
-{
- ExternalFunction*& lFunc = theFunctions[aLocalname];
- if (!lFunc) {
- if (1 == 0) {
- } else if (aLocalname == "resize") {
- lFunc = new ResizeFunction(this);
- } else if (aLocalname == "zoom-by-width") {
- lFunc = new ZoomByWidthFunction(this);
- } else if (aLocalname == "zoom-by-height") {
- lFunc = new ZoomByHeightFunction(this);
- } else if (aLocalname == "zoom") {
- lFunc = new ZoomFunction(this);
- } else if (aLocalname == "sub-image") {
- lFunc = new SubImageFunction(this);
- } else if (aLocalname == "overlay-impl") {
- lFunc = new OverlayFunction(this);
- } else if (aLocalname == "chop") {
- lFunc = new ChopFunction(this);
- } else if (aLocalname == "crop") {
- lFunc = new CropFunction(this);
- } else if (aLocalname == "rotate") {
- lFunc = new RotateFunction(this);
- } else if (aLocalname == "erase") {
- lFunc = new EraseFunction(this);
- } else if (aLocalname == "flop") {
- lFunc = new FlopFunction(this);
- } else if (aLocalname == "flip") {
- lFunc = new FlipFunction(this);
- } else if (aLocalname == "trim") {
- lFunc = new TrimFunction(this);
- } else if (aLocalname == "add-noise-impl") {
- lFunc = new AddNoiseFunction(this);
- } else if (aLocalname == "blur") {
- lFunc = new BlurFunction(this);
- } else if (aLocalname == "despeckle") {
- lFunc = new DespeckleFunction(this);
- } else if (aLocalname == "enhance") {
- lFunc = new EnhanceFunction(this);
- } else if (aLocalname == "equalize") {
- lFunc = new EqualizeFunction(this);
- } else if (aLocalname == "edge") {
- lFunc = new EdgeFunction(this);
- } else if (aLocalname == "charcoal") {
- lFunc = new CharcoalFunction(this);
- } else if (aLocalname == "emboss") {
- lFunc = new EmbossFunction(this);
- } else if (aLocalname == "solarize") {
- lFunc = new SolarizeFunction(this);
- } else if (aLocalname == "stereo") {
- lFunc = new StereoFunction(this);
- } else if (aLocalname == "transparent-impl") {
- lFunc = new TransparentFunction(this);
- } else if (aLocalname == "swirl") {
- lFunc = new SwirlFunction(this);
- } else if (aLocalname == "reduce-noise") {
- lFunc = new ReduceNoiseFunction(this);
- } else if (aLocalname == "contrast") {
- lFunc = new ContrastFunction(this);
- } else if (aLocalname == "gamma") {
- lFunc = new GammaFunction(this);
- } else if (aLocalname == "implode") {
- lFunc = new ImplodeFunction(this);
- } else if (aLocalname == "oil-paint") {
- lFunc = new OilPaintFunction(this);
- } else if (aLocalname == "watermark") {
- lFunc = new WaterMarkFunction(this);
- }
- }
- return lFunc;
-}
-
-
-} /* namespace manipulationmodule */ } /* namespace imagemodule */ } /* namespace zorba */
=== removed file 'src/com/zorba-xquery/www/modules/image/manipulation.xq.src/manipulation_module.h'
--- src/com/zorba-xquery/www/modules/image/manipulation.xq.src/manipulation_module.h 2011-10-06 08:18:47 +0000
+++ src/com/zorba-xquery/www/modules/image/manipulation.xq.src/manipulation_module.h 1970-01-01 00:00:00 +0000
@@ -1,52 +0,0 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ZORBA_IMAGEMODULE_MANIPULATIONMODULE_MANIPULATIONMODULE_H
-#define ZORBA_IMAGEMODULE_MANIPULATIONMODULE_MANIPULATIONMODULE_H
-
-#include <map>
-
-#include <zorba/zorba.h>
-#include <zorba/external_module.h>
-#include "image_module.h"
-
-namespace zorba { namespace imagemodule { namespace manipulationmodule {
-
-class ManipulationModule : public zorba::imagemodule::ImageModule
-{
-
-
-
- virtual String
- getURI() const { return "http://www.zorba-xquery.com/modules/image/manipulation"; }
-
- virtual ExternalFunction*
- getExternalFunction(const String& aLocalname);
-
-};
-
-
-} /* namespace manipulationmodule */
-} /* namespace imagemodule */
-} /* namespace zorba */
-
-#endif /* ZORBA_IMAGEMODULE_MANIPULATIONMODULE_MANIPULATIONMODULE_H */
-
-/*
- * Local variables:
- * mode: c++
- * End:
- */
=== renamed file 'src/com/zorba-xquery/www/modules/image/paint.xq' => 'src/com/zorba-xquery/www/modules/image/paint.xq.THIS'
=== renamed 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.THIS'
=== removed file 'src/com/zorba-xquery/www/modules/image/paint.xq.src/paint.h'
--- src/com/zorba-xquery/www/modules/image/paint.xq.src/paint.h 2011-10-06 08:18:47 +0000
+++ src/com/zorba-xquery/www/modules/image/paint.xq.src/paint.h 1970-01-01 00:00:00 +0000
@@ -1,103 +0,0 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#ifndef ZORBA_IMAGEMODULE_PAINTMODULE_PAINT_H
-#define ZORBA_IMAGEMODULE_PAINTMODULE_PAINT_H
-
-#include "image_function.h"
-#include <wand/MagickWand.h>
-#include <string>
-
-namespace zorba {
-
- class ItemFactory;
- class SerializationItemProvider;
-
- namespace imagemodule { namespace paintmodule {
-
-
-
-//*****************************************************************************
-
-class PaintImplFunction : public zorba::imagemodule::ImageFunction
-
- {
- public:
- PaintImplFunction(const ImageModule* aModule);
- virtual String getLocalName() const { return "paint-impl";}
-
- virtual ItemSequence_t
- evaluate(const ExternalFunction::Arguments_t& args,
- const StaticContext* aSctxCtx,
- const DynamicContext* aDynCtx) const;
-
- virtual void
- applyShape(Magick::Blob& aBlob, Item& aShape) const;
-
- virtual void
- applyLine(Magick::Blob& aBlob, Item& aShape) const;
-
- virtual void
- applyPolyLine(Magick::Blob& aBlob, Item& aShape) const;
-
- virtual void
- applyStrokedPolyLine(Magick::Blob& aBlob, Item& aShape) const;
-
- virtual void
- applyRectangle(Magick::Blob& aBlob, Item& aShape) const;
-
- virtual void
- applyRoundedRectangle(Magick::Blob& aBlob, Item& aShape) const;
-
- virtual void
- applyCircle(Magick::Blob& aBlob, Item& aShape) const;
-
- virtual void
- applyEllipse(Magick::Blob& aBlob, Item& aShape) const;
-
- virtual void
- applyArc(Magick::Blob& aBlob, Item& aShape) const;
-
-
- virtual void
- applyPolygon(Magick::Blob& aBlob, Item& aShape) const;
-
-
- virtual void
- applyText(Magick::Blob& aBlob, Item& aShape) const;
-
- virtual bool
- getCommonValues(Iterator_t& aChildIterator,
- Item& aLastItemFound,
- double* aStrokeWidth,
- std::string& aStrokeColor,
- std::string& aFillColor) const;
-
-
- double
- getDoubleValue(Item& aDoubleItem) const;
-
-
- void
- getDoublesFromPoint(Item& aPointItem, double aPoint[2]) const;
-
-
-
- };
-
-} /* namespace paintmodule */ } /* namespace imagemodule */ } /* namespace zorba */
-
-#endif /* ZORBA_IMAGEMODULE_PAINTMODULE_PAINT_H */
-
=== removed file 'src/com/zorba-xquery/www/modules/image/paint.xq.src/paint_module.cpp'
--- src/com/zorba-xquery/www/modules/image/paint.xq.src/paint_module.cpp 2011-10-06 08:18:47 +0000
+++ src/com/zorba-xquery/www/modules/image/paint.xq.src/paint_module.cpp 1970-01-01 00:00:00 +0000
@@ -1,35 +0,0 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "paint.h"
-#include "paint_module.h"
-
-namespace zorba { namespace imagemodule { namespace paintmodule {
-
-ExternalFunction*
-PaintModule::getExternalFunction(const String& aLocalname)
-{
- ExternalFunction*& lFunc = theFunctions[aLocalname];
- if (!lFunc) {
- if (aLocalname == "paint-impl") {
- lFunc = new PaintImplFunction(this);
- }
- }
- return lFunc;
-}
-
-} /* namespace paintmodule */ } /* namespace imagemodule */ } /* namespace zorba */
-
=== removed file 'src/com/zorba-xquery/www/modules/image/paint.xq.src/paint_module.h'
--- src/com/zorba-xquery/www/modules/image/paint.xq.src/paint_module.h 2011-10-06 08:18:47 +0000
+++ src/com/zorba-xquery/www/modules/image/paint.xq.src/paint_module.h 1970-01-01 00:00:00 +0000
@@ -1,55 +0,0 @@
-/*
- * Copyright 2006-2008 The FLWOR Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ZORBA_IMAGEMODULE_PAINTMODULE_PAINTMODULE_H
-#define ZORBA_IMAGEMODULE_PAINTMODULE_PAINTMODULE_H
-
-#include <map>
-
-#include <zorba/zorba.h>
-#include <zorba/external_module.h>
-#include "image_module.h"
-
-namespace zorba { namespace imagemodule { namespace paintmodule {
-
-class PaintModule : public zorba::imagemodule::ImageModule
-{
-
-
-
-
-public:
-
- virtual String
- getURI() const { return "http://www.zorba-xquery.com/modules/image/paint"; }
-
- virtual ExternalFunction*
- getExternalFunction(const String& aLocalname);
-
-
-};
-
-} /* namespace paintmodule */
-} /* namespace imagemodule */
-} /* namespace zorba */
-
-#endif /* ZORBA_IMAGEMODULE_PAINTMODULE_PAINTMODULE_H */
-
-/*
- * Local variables:
- * mode: c++
- * End:
- */
=== removed directory 'test/ExpQueryResults'
=== removed directory 'test/ExpQueryResults/image'
=== removed file 'test/ExpQueryResults/image/animation.xml.res'
--- test/ExpQueryResults/image/animation.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/animation.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-SUCCESS
=== removed file 'test/ExpQueryResults/image/animation_create.xml.res'
--- test/ExpQueryResults/image/animation_create.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/animation_create.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/animation_create_morphed.xml.res'
--- test/ExpQueryResults/image/animation_create_morphed.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/animation_create_morphed.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/basic.xml.res'
--- test/ExpQueryResults/image/basic.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/basic.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-SUCCESS
=== removed file 'test/ExpQueryResults/image/basic_compress.xml.res'
--- test/ExpQueryResults/image/basic_compress.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/basic_compress.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/basic_convert.xml.res'
--- test/ExpQueryResults/image/basic_convert.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/basic_convert.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/basic_create.xml.res'
--- test/ExpQueryResults/image/basic_create.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/basic_create.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/basic_equals.xml.res'
--- test/ExpQueryResults/image/basic_equals.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/basic_equals.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-false
=== removed file 'test/ExpQueryResults/image/basic_exif.xml.res'
--- test/ExpQueryResults/image/basic_exif.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/basic_exif.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-20
=== removed file 'test/ExpQueryResults/image/basic_height.xml.res'
--- test/ExpQueryResults/image/basic_height.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/basic_height.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-160
=== removed file 'test/ExpQueryResults/image/basic_svg.xml.res'
--- test/ExpQueryResults/image/basic_svg.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/basic_svg.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/basic_type.xml.res'
--- test/ExpQueryResults/image/basic_type.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/basic_type.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-GIF
=== removed file 'test/ExpQueryResults/image/basic_width.xml.res'
--- test/ExpQueryResults/image/basic_width.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/basic_width.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-134
=== removed directory 'test/ExpQueryResults/image/manipulation'
=== removed file 'test/ExpQueryResults/image/manipulation/manipulation_add_noise.xml.res'
--- test/ExpQueryResults/image/manipulation/manipulation_add_noise.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation/manipulation_add_noise.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_1.xml.res'
--- test/ExpQueryResults/image/manipulation_1.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_1.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-SUCCESS
=== removed file 'test/ExpQueryResults/image/manipulation_2.xml.res'
--- test/ExpQueryResults/image/manipulation_2.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_2.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-SUCCESS
=== removed file 'test/ExpQueryResults/image/manipulation_3.xml.res'
--- test/ExpQueryResults/image/manipulation_3.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_3.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-SUCCESS
=== removed file 'test/ExpQueryResults/image/manipulation_4.xml.res'
--- test/ExpQueryResults/image/manipulation_4.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_4.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-SUCCESS
=== removed file 'test/ExpQueryResults/image/manipulation_5.xml.res'
--- test/ExpQueryResults/image/manipulation_5.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_5.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-SUCCESS
=== removed file 'test/ExpQueryResults/image/manipulation_add_noise.xml.res'
--- test/ExpQueryResults/image/manipulation_add_noise.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_add_noise.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_blur.xml.res'
--- test/ExpQueryResults/image/manipulation_blur.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_blur.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_charcoal.xml.res'
--- test/ExpQueryResults/image/manipulation_charcoal.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_charcoal.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_chop.xml.res'
--- test/ExpQueryResults/image/manipulation_chop.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_chop.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_contrast.xml.res'
--- test/ExpQueryResults/image/manipulation_contrast.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_contrast.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_crop.xml.res'
--- test/ExpQueryResults/image/manipulation_crop.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_crop.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_despeckle.xml.res'
--- test/ExpQueryResults/image/manipulation_despeckle.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_despeckle.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_edge.xml.res'
--- test/ExpQueryResults/image/manipulation_edge.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_edge.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_emboss.xml.res'
--- test/ExpQueryResults/image/manipulation_emboss.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_emboss.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_enhance.xml.res'
--- test/ExpQueryResults/image/manipulation_enhance.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_enhance.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_equalize.xml.res'
--- test/ExpQueryResults/image/manipulation_equalize.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_equalize.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_erase.xml.res'
--- test/ExpQueryResults/image/manipulation_erase.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_erase.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_flip.xml.res'
--- test/ExpQueryResults/image/manipulation_flip.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_flip.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_flop.xml.res'
--- test/ExpQueryResults/image/manipulation_flop.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_flop.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_gamma.xml.res'
--- test/ExpQueryResults/image/manipulation_gamma.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_gamma.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_gamma2.xml.res'
--- test/ExpQueryResults/image/manipulation_gamma2.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_gamma2.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_implode.xml.res'
--- test/ExpQueryResults/image/manipulation_implode.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_implode.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_oil_paint.xml.res'
--- test/ExpQueryResults/image/manipulation_oil_paint.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_oil_paint.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_overlay.xml.res'
--- test/ExpQueryResults/image/manipulation_overlay.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_overlay.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_reduce_noise.xml.res'
--- test/ExpQueryResults/image/manipulation_reduce_noise.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_reduce_noise.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_resize.xml.res'
--- test/ExpQueryResults/image/manipulation_resize.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_resize.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_rotate.xml.res'
--- test/ExpQueryResults/image/manipulation_rotate.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_rotate.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_solarize.xml.res'
--- test/ExpQueryResults/image/manipulation_solarize.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_solarize.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_stereo.xml.res'
--- test/ExpQueryResults/image/manipulation_stereo.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_stereo.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_sub_image.xml.res'
--- test/ExpQueryResults/image/manipulation_sub_image.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_sub_image.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_swirl.xml.res'
--- test/ExpQueryResults/image/manipulation_swirl.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_swirl.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_transparent.xml.res'
--- test/ExpQueryResults/image/manipulation_transparent.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_transparent.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_trim.xml.res'
--- test/ExpQueryResults/image/manipulation_trim.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_trim.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_watermark.xml.res'
--- test/ExpQueryResults/image/manipulation_watermark.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_watermark.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_zoom.xml.res'
--- test/ExpQueryResults/image/manipulation_zoom.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_zoom.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_zoom_height.xml.res'
--- test/ExpQueryResults/image/manipulation_zoom_height.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_zoom_height.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/manipulation_zoom_width.xml.res'
--- test/ExpQueryResults/image/manipulation_zoom_width.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/manipulation_zoom_width.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/paint_1.xml.res'
--- test/ExpQueryResults/image/paint_1.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/paint_1.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-SUCCESS
=== removed file 'test/ExpQueryResults/image/paint_2.xml.res'
--- test/ExpQueryResults/image/paint_2.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/paint_2.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-SUCCESS
=== removed file 'test/ExpQueryResults/image/paint_3.xml.res'
--- test/ExpQueryResults/image/paint_3.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/paint_3.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-SUCCESS
=== removed file 'test/ExpQueryResults/image/paint_4.xml.res'
--- test/ExpQueryResults/image/paint_4.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/paint_4.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-SUCCESS
=== removed file 'test/ExpQueryResults/image/paint_5.xml.res'
--- test/ExpQueryResults/image/paint_5.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/paint_5.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-SUCCESS
=== removed file 'test/ExpQueryResults/image/paint_6.xml.res'
--- test/ExpQueryResults/image/paint_6.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/paint_6.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-SUCCESS
=== removed file 'test/ExpQueryResults/image/paint_7.xml.res'
--- test/ExpQueryResults/image/paint_7.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/paint_7.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-SUCCESS
=== removed file 'test/ExpQueryResults/image/paint_circles.xml.res'
--- test/ExpQueryResults/image/paint_circles.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/paint_circles.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/paint_different_lines.xml.res'
--- test/ExpQueryResults/image/paint_different_lines.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/paint_different_lines.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/paint_polygon.xml.res'
--- test/ExpQueryResults/image/paint_polygon.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/paint_polygon.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/paint_polyline.xml.res'
--- test/ExpQueryResults/image/paint_polyline.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/paint_polyline.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/paint_rectangles.xml.res'
--- test/ExpQueryResults/image/paint_rectangles.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/paint_rectangles.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/paint_stroked_polyline.xml.res'
--- test/ExpQueryResults/image/paint_stroked_polyline.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/paint_stroked_polyline.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/ExpQueryResults/image/paint_text.xml.res'
--- test/ExpQueryResults/image/paint_text.xml.res 2011-10-06 08:18:47 +0000
+++ test/ExpQueryResults/image/paint_text.xml.res 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
-true
=== removed file 'test/Queries/image/animation.xq'
--- test/Queries/image/animation.xq 2012-04-11 09:50:23 +0000
+++ test/Queries/image/animation.xq 1970-01-01 00:00:00 +0000
@@ -1,77 +0,0 @@
-(:~
- : Simple test module for the animation functions of the image library.
- :
- : @author Daniel Thomas
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace ani = 'http://www.zorba-xquery.com/modules/image/animation';
-import schema namespace image = 'http://www.zorba-xquery.com/modules/image/image';
-
-declare namespace an = "http://www.zorba-xquery.com/annotations";
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-(:~
- : Outputs a nice error message to the screen ...
- :
- : @param $messsage is the message to be displayed
- : @return The passed message but really very, very nicely formatted.
- :)
-declare function local:error($messages as xs:string*) as xs:string* {
- "
-************************************************************************
-ERROR:
- Location:", file:path-to-native("."), "
- Cause:",
- $messages,
- "
-************************************************************************
-"
-};
-(:~
- : @return true if the ani:create-animated-gif function works.
- :)
-declare %an:nondeterministic function local:test-create-animated-gif() as xs:boolean {
- let $gif1 := file:read-binary(concat($local:image-dir, "bird.gif"))
- let $gif2 := file:read-binary(concat($local:image-dir, "bird2.gif"))
- let $animatedGif := ani:create-animated-gif(($gif1, $gif2), xs:unsignedInt(10), xs:unsignedInt(0))
- let $animatedRef := file:read-binary(concat($local:image-dir, "animation/simple.gif"))
- return basic:equals($animatedGif, $animatedRef)
-};
-
-(:~
- : @return true if the ani:create-morphed-gif function works.
- :)
-declare %an:nondeterministic function local:test-create-morphed-gif() as xs:boolean {
- let $gif1 := file:read-binary(concat($local:image-dir, "bird.gif"))
- let $gif2 := file:read-binary(concat($local:image-dir, "bird2.gif"))
- let $animatedGif := ani:create-morphed-gif(($gif1, $gif2), xs:unsignedInt(10), xs:unsignedInt(0), xs:unsignedInt(2 ))
- let $animatedRef := file:read-binary(concat($local:image-dir, "animation/morph.gif"))
- return basic:equals($animatedGif, $animatedRef)
-};
-
-
-
-
-declare %an:nondeterministic %an:sequential function local:main() as xs:string* {
-
- let $a := local:test-create-animated-gif()
- return
- if (fn:not($a)) then
- exit returning local:error(("Creating simple animated gif failed"));
- else ();
-
- let $b := local:test-create-morphed-gif()
- return
- if (fn:not($b)) then
- exit returning local:error(("Creating simple morphed gif failed"));
- else ();
-
- (: If all went well ... make sure the world knows! :)
- "SUCCESS"
-};
-
-local:main()
-
=== removed file 'test/Queries/image/animation_create.xq'
--- test/Queries/image/animation_create.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/animation_create.xq 1970-01-01 00:00:00 +0000
@@ -1,15 +0,0 @@
-(:~
- : This example uses the file module to read two GIF images from disk and combines the to a simple animation.
- : The delay is set to 1/10th of a second and by setting the iterations to zero, we get an animated gif that goes on with the animation infinitely.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty, in a real application one could further process the image, or write it
- : to disk using file:write-binary(a_path, $animatedGif), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace animation = 'http://www.zorba-xquery.com/modules/image/animation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-let $gif1 := file:read-binary(concat($local:image-dir, "bird.gif"))
-let $gif2 := file:read-binary(concat($local:image-dir, "bird2.gif"))
-let $animatedGif := animation:create-animated-gif(($gif1, $gif2), xs:unsignedInt(10), xs:unsignedInt(0))
-return not(empty($animatedGif))
=== removed file 'test/Queries/image/animation_create_morphed.xq'
--- test/Queries/image/animation_create_morphed.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/animation_create_morphed.xq 1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
-(:~
- : This example uses the file module to read two GIF images from disk and combines the to a simple animation in which the images are morphed into each other.
- : The delay is set to 1/10th of a second and by setting the iterations to zero, we get an animated gif that goes on with the animation infinitely.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty, in a real application one could further process the image, or write it
- : to disk using file:write-binary(a_path, $animatedGif), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace animation = 'http://www.zorba-xquery.com/modules/image/animation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-let $gif1 := file:read-binary(concat($local:image-dir, "bird.gif"))
-let $gif2 := file:read-binary(concat($local:image-dir, "bird2.gif"))
-let $animatedGif := animation:create-morphed-gif(($gif1, $gif2), xs:unsignedInt(10), xs:unsignedInt(0), xs:unsignedInt(2))
-return not(empty($animatedGif))
-
=== removed file 'test/Queries/image/basic.xq'
--- test/Queries/image/basic.xq 2012-04-11 09:50:23 +0000
+++ test/Queries/image/basic.xq 1970-01-01 00:00:00 +0000
@@ -1,191 +0,0 @@
-(:~
- : Simple test module for the basic functions of the image library.
- :
- : @author Daniel Thomas
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace file = 'http://expath.org/ns/file';
-
-declare namespace an = "http://www.zorba-xquery.com/annotations";
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-declare variable $local:png as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.png"));
-declare variable $local:gif as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.gif"));
-declare variable $local:tiff as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.tiff"));
-declare variable $local:jpg as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"));
-
-
-
-(:~
- : Outputs a nice error message to the screen ...
- :
- : @param $messsage is the message to be displayed
- : @return The passed message but really very, very nicely formatted.
- :)
-declare function local:error($messages as xs:string*) as xs:string* {
- "
-************************************************************************
-ERROR:
- Location:", file:path-to-native("."), "
- Cause:",
- $messages,
- "
-************************************************************************
-"
-};
-
-(:~
- : @return true if the basic:width function works.
- :)
-declare function local:test-width() as xs:boolean {
- ((basic:width($local:png) = 134) and (basic:width($local:gif) = 134) and (basic:width($local:jpg) = 134) and (basic:width($local:tiff) = 134))
-
-};
-
-(:~
- : @return true if the basic:height function works.
- :)
-declare function local:test-height() as xs:boolean {
- ((basic:height($local:png) = 160) and (basic:height($local:gif) = 160) and (basic:height($local:jpg) = 160) and (basic:height($local:tiff) = 160))
-
-};
-
-(:~
- : @return true if the basic:create function works.
- :)
-declare %an:nondeterministic function local:test-create() as xs:boolean {
- let $blank-gif := basic:create(xs:unsignedInt(10), xs:unsignedInt(20), "GIF")
- let $blank-png := basic:create(xs:unsignedInt(10), xs:unsignedInt(20), "PNG")
- let $blank-jpg := basic:create(xs:unsignedInt(10), xs:unsignedInt(20), "JPEG")
- let $blank-tiff := basic:create(xs:unsignedInt(10), xs:unsignedInt(20), "TIFF")
- let $ref-gif := file:read-binary(concat($local:image-dir, "blank.gif"))
- let $ref-jpg := file:read-binary(concat($local:image-dir, "blank.jpg"))
- let $ref-tiff := file:read-binary(concat($local:image-dir, "blank.tiff"))
- let $ref-png := file:read-binary(concat($local:image-dir, "blank.png"))
- return (basic:equals($blank-gif, $ref-gif) and basic:equals($blank-png, $ref-png) and basic:equals($blank-jpg, $ref-jpg) and basic:equals($blank-tiff, $ref-tiff))
-};
-
-(:~
- : @return true if the basic:format function works.
- :)
-declare function local:test-format() as xs:boolean {
- ((basic:format($local:png) eq "PNG") and (basic:format($local:gif) eq "GIF")
- and (basic:format($local:tiff) eq "TIFF") and (basic:format($local:jpg) eq "JPEG"))
-};
-
-
-(:~
- : @return true if the basic:convert function works.
- :)
-declare function local:test-convert() as xs:boolean {
- let $png-to-jpeg := basic:convert($local:png, "JPEG")
- let $png-to-tiff := basic:convert($local:png, "TIFF")
- let $png-to-gif := basic:convert($local:png, "GIF")
- return (basic:equals($png-to-jpeg, $local:jpg) and basic:equals($png-to-tiff, $local:tiff) and basic:equals($png-to-gif, $local:gif))
-};
-
-(:~
- : @return true if the basic:compress function works.
- :)
-declare %an:nondeterministic function local:test-compress() as xs:boolean {
- let $uncompressed := file:read-binary(concat($local:image-dir, "uncompressed.jpg"))
- let $compressed := basic:compress($uncompressed, xs:unsignedInt(20))
- let $compressed-ref := file:read-binary(concat($local:image-dir, "compressed.jpg"))
- return basic:equals($compressed, $compressed-ref)
-};
-
-(:~
- : @return true if the basic:equals function works.
- :)
-declare %an:nondeterministic function local:test-equals() as xs:boolean {
- (basic:equals($local:gif, $local:gif) and (not (basic:equals($local:gif, file:read-binary(concat($local:image-dir, "manipulation/gamma1Bird.gif"))))))
-};
-
-
-(:~
- : @return true if the basic:exif function works.
- :)
-declare %an:nondeterministic function local:test-exif() as xs:boolean {
- let $exif := file:read-binary(concat($local:image-dir, "exif.jpg"))
- return ((basic:exif($exif, "ExifImageWidth") eq "20") and fn:empty(basic:exif($exif, "supercalifragilisticexpialidocious")))
-};
-
-
-declare %an:nondeterministic function local:test-convert-svg() as xs:boolean {
- let $svg-converted := basic:convert-svg(file:read-binary(concat($local:image-dir, "test.svg")), "JPEG")
- let $to-compare := file:read-binary(concat($local:image-dir, "test.jpeg"))
- return basic:equals($svg-converted, $to-compare)
-};
-
-
-declare %an:nondeterministic %an:sequential function local:main() as xs:string* {
-
- let $a := local:test-width()
- return
- if (fn:not($a)) then
- exit returning local:error(("Determining width of images failed"));
- else ();
-
- (: ==================================================================== :)
-
- let $b := local:test-height()
- return
- if (fn:not($b)) then
- exit returning local:error(("Determining height of images failed"));
- else ();
-
- (: ==================================================================== :)
-
- let $c := local:test-create()
- return
- if (fn:not($c)) then
- exit returning local:error(("Creation of images failed"));
- else ();
-
- (: ==================================================================== :)
-
- let $d := local:test-format()
- return
- if (fn:not($d)) then
- exit returning local:error("Getting format of images failed");
- else ();
- (: ==================================================================== :)
-
- let $e := local:test-convert()
- return
- if (fn:not($e)) then
- exit returning local:error("Conversion of images failed");
- else ();
-
- (: ==================================================================== :)
-
- let $f := local:test-compress()
- return
- if (fn:not($f)) then
- exit returning local:error("Compression of images failed");
- else ();
-
- (: ==================================================================== :)
-
- let $g := local:test-equals()
- return
- if (fn:not($g)) then
- exit returning local:error("Equals function not working properly");
- else ();
-
-
- let $h := local:test-exif()
- return
- if (fn:not($h)) then
- exit returning local:error("Reading out exif information not working properly");
- else ();
-
-
- (: If all went well ... make sure the world knows! :)
- "SUCCESS"
-};
-
-local:main()
-
=== removed file 'test/Queries/image/basic_compress.xq'
--- test/Queries/image/basic_compress.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/basic_compress.xq 1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
-(:~
- : This example uses the file module to read an image from disk and compresses the image to a quality of 2 (with 1 being the lowest and 10 being the heighest possible value).
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty, in a real application one could further process the image, or write it
- : to disk using file:write-binary(a_path, basic:compress($compressed-bird, xs:unsignedInt(2))), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $compressed-bird := basic:compress($bird, xs:unsignedInt(2))
-return not(empty($compressed-bird))
=== removed file 'test/Queries/image/basic_convert.xq'
--- test/Queries/image/basic_convert.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/basic_convert.xq 1970-01-01 00:00:00 +0000
@@ -1,15 +0,0 @@
-(:~
- : This example uses the file module to read a JPG image from disk and converts it to a GIF image.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty, in a real application one could further process the image, or write it
- : to disk using file:write-binary(a_path, basic:compress($gif-bird, xs:unsignedInt(2))), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $jpg-bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $gif-bird := basic:convert($jpg-bird, "GIF")
-return not(empty($gif-bird))
-
=== removed file 'test/Queries/image/basic_create.xq'
--- test/Queries/image/basic_create.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/basic_create.xq 1970-01-01 00:00:00 +0000
@@ -1,11 +0,0 @@
-(:~
- : This example creates a GIF image with a width of 100 pixels and height of 50 pixels.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty, in a real application one could further process the image, or write it
- : to disk using file:write-binary(a_path, $new-image)), send it in an email etc.
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-
-let $new-image as xs:base64Binary := basic:create(xs:unsignedInt(100), xs:unsignedInt(50), "GIF")
-return not(empty($new-image))
-
-
=== removed file 'test/Queries/image/basic_equals.xq'
--- test/Queries/image/basic_equals.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/basic_equals.xq 1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
-(:~
- : This exaple uses the file module to read two different images from disk and uses the equals function from the image/basic module to assert that they
- : are not equal.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-let $image as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $different-image as xs:base64Binary := file:read-binary(concat($local:image-dir, "manipulation/gamma1Bird.gif"))
-return basic:equals($image, $different-image)
-
=== removed file 'test/Queries/image/basic_exif.xq'
--- test/Queries/image/basic_exif.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/basic_exif.xq 1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
-(:~
- : This example uses the file module to read a JPG image from disk and uses the exif function from the image/basic module to read out the value of an exif tag.
- : Trying to read out the value of an non-existing exif tag will result in an empty sequence.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-let $exif-image as xs:base64Binary := file:read-binary(concat($local:image-dir, "/exif.jpg"))
-return basic:exif($exif-image, "ExifImageWidth")
-
-
=== removed file 'test/Queries/image/basic_height.xq'
--- test/Queries/image/basic_height.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/basic_height.xq 1970-01-01 00:00:00 +0000
@@ -1,12 +0,0 @@
-(:~
- : Simple example that uses the file module to read an image from disk and returns the height of the image using the height function of the image/basic module.
- : The basic:height function returns the height in pixels (as xs:unsignedInt).
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.tiff"))
-return basic:height($bird)
=== renamed file 'test/Queries/image/basic_svg.xq' => 'test/Queries/image/basic_svg.xq.THIS'
=== removed file 'test/Queries/image/basic_type.xq'
--- test/Queries/image/basic_type.xq 2011-08-04 04:09:00 +0000
+++ test/Queries/image/basic_type.xq 1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
-(:~
- : Simple example that uses the file module to read a GIF image from disk and returns the format of the read image.
- : The basic:width function returns the width in pixels (as xs:unsignedInt).
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.gif"))
-return basic:format($bird)
-
=== removed file 'test/Queries/image/basic_width.xq'
--- test/Queries/image/basic_width.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/basic_width.xq 1970-01-01 00:00:00 +0000
@@ -1,13 +0,0 @@
-(:~
- : Simple example that uses the file module to read an image from disk and returns the width of the image using the width function of the image/basic module.
- : The basic:width function returns the width in pixels (as xs:unsignedInt).
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.png"))
-return basic:width($bird)
-
=== removed directory 'test/Queries/image/images'
=== removed file 'test/Queries/image/images/animatedGif.gif'
Binary files test/Queries/image/images/animatedGif.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/animatedGif.gif 1970-01-01 00:00:00 +0000 differ
=== removed directory 'test/Queries/image/images/animation'
=== removed file 'test/Queries/image/images/animation/morph.gif'
Binary files test/Queries/image/images/animation/morph.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/animation/morph.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/animation/rotation.gif'
Binary files test/Queries/image/images/animation/rotation.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/animation/rotation.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/animation/simple.gif'
Binary files test/Queries/image/images/animation/simple.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/animation/simple.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/animation/test.gif'
Binary files test/Queries/image/images/animation/test.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/animation/test.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/bird.gif'
Binary files test/Queries/image/images/bird.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/bird.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/bird.jpg'
Binary files test/Queries/image/images/bird.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/bird.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/bird.png'
Binary files test/Queries/image/images/bird.png 2011-03-24 20:44:47 +0000 and test/Queries/image/images/bird.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/bird.tiff'
Binary files test/Queries/image/images/bird.tiff 2011-03-24 20:44:47 +0000 and test/Queries/image/images/bird.tiff 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/bird2.gif'
Binary files test/Queries/image/images/bird2.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/bird2.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/blank.gif'
Binary files test/Queries/image/images/blank.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/blank.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/blank.jpg'
Binary files test/Queries/image/images/blank.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/blank.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/blank.png'
Binary files test/Queries/image/images/blank.png 2011-03-24 20:44:47 +0000 and test/Queries/image/images/blank.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/blank.tiff'
Binary files test/Queries/image/images/blank.tiff 2011-03-24 20:44:47 +0000 and test/Queries/image/images/blank.tiff 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/compressed.jpg'
Binary files test/Queries/image/images/compressed.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/compressed.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/exif.jpg'
Binary files test/Queries/image/images/exif.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/exif.jpg 1970-01-01 00:00:00 +0000 differ
=== removed directory 'test/Queries/image/images/manipulation'
=== removed file 'test/Queries/image/images/manipulation/bigBird.gif'
Binary files test/Queries/image/images/manipulation/bigBird.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/bigBird.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/blurredBird.jpg'
Binary files test/Queries/image/images/manipulation/blurredBird.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/blurredBird.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/charcoaledBird.jpg'
Binary files test/Queries/image/images/manipulation/charcoaledBird.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/charcoaledBird.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/contrastedBird.gif'
Binary files test/Queries/image/images/manipulation/contrastedBird.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/contrastedBird.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/despeckledBird.jpg'
Binary files test/Queries/image/images/manipulation/despeckledBird.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/despeckledBird.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/edgedBird.jpg'
Binary files test/Queries/image/images/manipulation/edgedBird.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/edgedBird.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/embossedBird.jpg'
Binary files test/Queries/image/images/manipulation/embossedBird.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/embossedBird.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/enhancedBird.jpg'
Binary files test/Queries/image/images/manipulation/enhancedBird.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/enhancedBird.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/equalizedBird.jpg'
Binary files test/Queries/image/images/manipulation/equalizedBird.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/equalizedBird.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/erased.jpg'
Binary files test/Queries/image/images/manipulation/erased.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/erased.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/flippedBird.jpg'
Binary files test/Queries/image/images/manipulation/flippedBird.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/flippedBird.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/floppedBird.jpg'
Binary files test/Queries/image/images/manipulation/floppedBird.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/floppedBird.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/gamma1Bird.gif'
Binary files test/Queries/image/images/manipulation/gamma1Bird.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/gamma1Bird.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/gamma2Bird.gif'
Binary files test/Queries/image/images/manipulation/gamma2Bird.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/gamma2Bird.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/implodeBird.gif'
Binary files test/Queries/image/images/manipulation/implodeBird.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/implodeBird.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/noisedBird.jpg'
Binary files test/Queries/image/images/manipulation/noisedBird.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/noisedBird.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/oilPaintBird.gif'
Binary files test/Queries/image/images/manipulation/oilPaintBird.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/oilPaintBird.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/overlayBird.jpg'
Binary files test/Queries/image/images/manipulation/overlayBird.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/overlayBird.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/overlayBird.png'
Binary files test/Queries/image/images/manipulation/overlayBird.png 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/overlayBird.png 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/reducedBird.gif'
Binary files test/Queries/image/images/manipulation/reducedBird.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/reducedBird.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/rotatedBird.jpg'
Binary files test/Queries/image/images/manipulation/rotatedBird.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/rotatedBird.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/solarizedBird.jpg'
Binary files test/Queries/image/images/manipulation/solarizedBird.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/solarizedBird.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/stereodBird.jpg'
Binary files test/Queries/image/images/manipulation/stereodBird.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/stereodBird.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/subBird.jpg'
Binary files test/Queries/image/images/manipulation/subBird.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/subBird.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/swirledBird.gif'
Binary files test/Queries/image/images/manipulation/swirledBird.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/swirledBird.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/transparentedBird.gif'
Binary files test/Queries/image/images/manipulation/transparentedBird.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/transparentedBird.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/trimmedBird.jpg'
Binary files test/Queries/image/images/manipulation/trimmedBird.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/trimmedBird.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/watermarked.gif'
Binary files test/Queries/image/images/manipulation/watermarked.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/watermarked.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/manipulation/zoomedBird.jpg'
Binary files test/Queries/image/images/manipulation/zoomedBird.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/manipulation/zoomedBird.jpg 1970-01-01 00:00:00 +0000 differ
=== removed directory 'test/Queries/image/images/paint'
=== removed file 'test/Queries/image/images/paint/arc.jpg'
Binary files test/Queries/image/images/paint/arc.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/arc.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/arcAntiAliased.jpg'
Binary files test/Queries/image/images/paint/arcAntiAliased.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/arcAntiAliased.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/arcRed.jpg'
Binary files test/Queries/image/images/paint/arcRed.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/arcRed.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/arcRedGreen.jpg'
Binary files test/Queries/image/images/paint/arcRedGreen.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/arcRedGreen.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/arcWide.jpg'
Binary files test/Queries/image/images/paint/arcWide.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/arcWide.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/blueLine.gif'
Binary files test/Queries/image/images/paint/blueLine.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/blueLine.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/circle.jpg'
Binary files test/Queries/image/images/paint/circle.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/circle.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/colorLine.gif'
Binary files test/Queries/image/images/paint/colorLine.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/colorLine.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/ellipse.jpg'
Binary files test/Queries/image/images/paint/ellipse.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/ellipse.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/greenLine.gif'
Binary files test/Queries/image/images/paint/greenLine.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/greenLine.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/line.gif'
Binary files test/Queries/image/images/paint/line.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/line.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/polyLine.gif'
Binary files test/Queries/image/images/paint/polyLine.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/polyLine.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/polyLineAntiAliased.gif'
Binary files test/Queries/image/images/paint/polyLineAntiAliased.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/polyLineAntiAliased.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/polyLineFilled.gif'
Binary files test/Queries/image/images/paint/polyLineFilled.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/polyLineFilled.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/polyLineFilledRed.gif'
Binary files test/Queries/image/images/paint/polyLineFilledRed.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/polyLineFilledRed.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/polyLineFilledRedRed.gif'
Binary files test/Queries/image/images/paint/polyLineFilledRedRed.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/polyLineFilledRedRed.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/polyLineFilledRedRedAntiAliased.gif'
Binary files test/Queries/image/images/paint/polyLineFilledRedRedAntiAliased.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/polyLineFilledRedRedAntiAliased.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/polyLineRed.gif'
Binary files test/Queries/image/images/paint/polyLineRed.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/polyLineRed.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/polyLineStroked.gif'
Binary files test/Queries/image/images/paint/polyLineStroked.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/polyLineStroked.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/polyLineStrokedAntiAliased.gif'
Binary files test/Queries/image/images/paint/polyLineStrokedAntiAliased.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/polyLineStrokedAntiAliased.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/polyLineStrokedBlue.gif'
Binary files test/Queries/image/images/paint/polyLineStrokedBlue.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/polyLineStrokedBlue.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/polyLineStrokedWide.gif'
Binary files test/Queries/image/images/paint/polyLineStrokedWide.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/polyLineStrokedWide.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/polyLineWide.gif'
Binary files test/Queries/image/images/paint/polyLineWide.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/polyLineWide.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/polygon.jpg'
Binary files test/Queries/image/images/paint/polygon.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/polygon.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/polygonAntiAliased.jpg'
Binary files test/Queries/image/images/paint/polygonAntiAliased.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/polygonAntiAliased.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/polygonRed.jpg'
Binary files test/Queries/image/images/paint/polygonRed.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/polygonRed.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/polygonRedGreen.jpg'
Binary files test/Queries/image/images/paint/polygonRedGreen.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/polygonRedGreen.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/polygonWide.jpg'
Binary files test/Queries/image/images/paint/polygonWide.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/polygonWide.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/rectangle.gif'
Binary files test/Queries/image/images/paint/rectangle.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/rectangle.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/rectangleAntiAliased.gif'
Binary files test/Queries/image/images/paint/rectangleAntiAliased.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/rectangleAntiAliased.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/rectangleGreen.gif'
Binary files test/Queries/image/images/paint/rectangleGreen.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/rectangleGreen.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/rectangleGreenRed.gif'
Binary files test/Queries/image/images/paint/rectangleGreenRed.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/rectangleGreenRed.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/rectangleGreenRedWide.gif'
Binary files test/Queries/image/images/paint/rectangleGreenRedWide.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/rectangleGreenRedWide.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/rectangleRounded.gif'
Binary files test/Queries/image/images/paint/rectangleRounded.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/rectangleRounded.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/rectangleRoundedAntiAliased.gif'
Binary files test/Queries/image/images/paint/rectangleRoundedAntiAliased.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/rectangleRoundedAntiAliased.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/rectangleRoundedBlue.gif'
Binary files test/Queries/image/images/paint/rectangleRoundedBlue.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/rectangleRoundedBlue.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/rectangleRoundedBlueGreen.gif'
Binary files test/Queries/image/images/paint/rectangleRoundedBlueGreen.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/rectangleRoundedBlueGreen.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/rectangleRoundedWide.gif'
Binary files test/Queries/image/images/paint/rectangleRoundedWide.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/rectangleRoundedWide.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/redLine.gif'
Binary files test/Queries/image/images/paint/redLine.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/redLine.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/text.jpg'
Binary files test/Queries/image/images/paint/text.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/text.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/textBig.jpg'
Binary files test/Queries/image/images/paint/textBig.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/textBig.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/textHeavy.jpg'
Binary files test/Queries/image/images/paint/textHeavy.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/textHeavy.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/textHelvetica.jpg'
Binary files test/Queries/image/images/paint/textHelvetica.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/textHelvetica.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/textItalic.jpg'
Binary files test/Queries/image/images/paint/textItalic.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/textItalic.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/textOblique.jpg'
Binary files test/Queries/image/images/paint/textOblique.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/textOblique.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/textRed.jpg'
Binary files test/Queries/image/images/paint/textRed.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/textRed.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/paint/wideLine.gif'
Binary files test/Queries/image/images/paint/wideLine.gif 2011-03-24 20:44:47 +0000 and test/Queries/image/images/paint/wideLine.gif 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/images/test.svg'
--- test/Queries/image/images/test.svg 2011-06-27 12:26:56 +0000
+++ test/Queries/image/images/test.svg 1970-01-01 00:00:00 +0000
@@ -1,9 +0,0 @@
-<?xml version="1.0"?><svg width="640" height="480" xmlns="http://www.w3.org/2000/svg">
- <title>bird silhouette</title>
- <g>
- <title>Layer 1</title>
- <g id="g3">
- <path d="m221.606018,332.201996c1.830994,-10.377991 11.339966,-16.829987 12.029968,-27.300018c-9.104004,2.688019 -15.609985,5.485016 -24.290985,7.171021c-9.316986,1.809998 -15.412994,-2.666992 -21.977005,4.165009c1.498001,-12.847992 22.363022,-6.912018 30.07402,-12.261993c-6.52002,0.776001 -7.622009,-7.811035 -13.880005,-0.692993c3.883972,-11.647034 18.358978,-1.481018 26.140991,-4.166016c6.070984,-2.093018 11.623993,-9.286011 15.960999,-14.112c8.110992,-9.020996 17.934998,-18.002014 24.520996,-28.226013c-4.867981,-0.432983 -9.984009,-0.283997 -14.804993,0.231018c0.127991,0.665985 0.372986,1.201996 0.461975,2.080994c-5.457977,-3.643982 -5.688965,0.737 -7.86499,1.619995c-5.44397,2.208984 -9.290985,2.457001 -15.268005,2.544983c-12.141968,0.179016 -12.579987,2.105011 -19.199982,10.411011c-3.631012,4.554993 -12.10202,6.884003 -8.328003,12.957001c-10.996002,-5.116974 7.269989,-16.996979 8.328003,-23.368011c-8.875,1.924011 -41.727005,5.548035 -45.110001,12.031006c-0.388992,-11.011993 21.173996,-12.34198 29.147995,-12.955994c0,-0.153992 0,-0.309998 0,-0.463013c-0.230988,0.076019 -0.30899,0 -0.230988,-0.231995c-6.456009,-0.820984 -11.640015,-6.857971 -16.425018,-1.618988c1.490005,-10.050018 13.850006,-3.41098 18.044006,-2.313995c9.244019,2.417999 14.545013,-2.804016 24.520996,-4.39502c-44.319,-5.97998 -87.399994,-41.89299 -87.905975,-89.535995c-0.193024,-18.269989 7.208984,-37.171974 -1.850021,-54.137985c-7.188995,-13.464005 -21.701004,-15.842003 -34.699997,-21.285004c8.643997,-8.913002 23.906998,-3.130997 33.542999,-6.709999c5.639008,-2.094002 11.981003,-6.801003 18.274994,-8.329002c16.772003,-4.070999 31.960007,1.750999 45.110016,11.799004c9.050995,6.916 16.220001,16.758995 26.140991,22.441986c12.68399,7.266014 28.891998,9.455009 42.565002,14.807014c14.303009,5.600006 26.792999,13.759003 41.408997,18.509003c14.506989,4.714996 29.220001,9.513992 42.79599,16.65799c14.904022,7.843002 29.535004,8.264008 46.035004,11.105011c8.450012,1.454987 25.436005,2.479004 29.610992,10.411987c-8.888977,1.938019 -18.898987,3.082001 -28.222992,5.321014c28.062012,0 56.641998,4.71199 84.666962,7.518997c8.361084,0.83699 21.742065,-1.903 26.37207,5.436996c1.386963,2.199005 0.409973,6.727005 -1.156982,7.867004c4.030945,4.462997 -0.49707,6.112 -5.090088,5.320999c12.268066,0.714996 11.324036,6.541992 0.463013,6.477997c-20.494995,-0.123001 -42.243958,-4.212006 -62.920959,-5.783997c-13.054016,-0.993011 -26.084015,-2.052002 -39.097015,-3.354004c-7.063995,-0.707993 -15.225006,3.912994 -22.207001,5.669006c-13.826996,3.477997 -31.997009,1.475998 -42.10199,10.641998c-16.10199,14.606003 -33.5,23.000992 -51.588013,30.308975c-8.065002,3.259033 -34.362976,27.559021 -35.855988,37.942017c-0.126984,0.878998 -1.238007,2.378998 -1.618988,3.23999c7.731995,0.364014 28.868988,-11.198975 28.684998,3.237c-6.480011,-7.833008 -7.866028,-0.855988 -12.492004,1.156006c-3.407013,1.483002 -8.458008,1.325012 -12.028992,2.314026c-8.707031,2.411987 -10.649017,5.352966 -16.192993,13.881989c-3.698029,5.687988 -8.254028,11.131989 -12.492004,15.963989" id="path5" clip-rule="evenodd" fill-rule="evenodd" fill="#95db4e"/>
- </g>
- </g>
-</svg>
\ No newline at end of file
=== removed file 'test/Queries/image/images/uncompressed.jpg'
Binary files test/Queries/image/images/uncompressed.jpg 2011-03-24 20:44:47 +0000 and test/Queries/image/images/uncompressed.jpg 1970-01-01 00:00:00 +0000 differ
=== removed file 'test/Queries/image/manipulation_1.xq'
--- test/Queries/image/manipulation_1.xq 2012-04-11 09:50:23 +0000
+++ test/Queries/image/manipulation_1.xq 1970-01-01 00:00:00 +0000
@@ -1,148 +0,0 @@
-(:~
- : Simple test module for the manipulation functions of the image library.
- :
- : @author Daniel Thomas
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace man = 'http://www.zorba-xquery.com/modules/image/manipulation';
-import schema namespace image = 'http://www.zorba-xquery.com/modules/image/image';
-
-declare namespace an = "http://www.zorba-xquery.com/annotations";
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-declare variable $local:png as xs:base64Binary := file:read-binary(concat($local:image-dir, "bird.png"));
-declare variable $local:gif as xs:base64Binary := file:read-binary(concat($local:image-dir, "bird.gif"));
-declare variable $local:tiff as xs:base64Binary := file:read-binary(concat($local:image-dir, "bird.tiff"));
-declare variable $local:jpg as xs:base64Binary := file:read-binary(concat($local:image-dir, "bird.jpg"));
-
-
-(:~
- : Outputs a nice error message to the screen ...
- :
- : @param $messsage is the message to be displayed
- : @return The passed message but really very, very nicely formatted.
- :)
-declare function local:error($messages as xs:string*) as xs:string* {
- "
-************************************************************************
-ERROR:
- Location:", file:path-to-native("."), "
- Cause:",
- $messages,
- "
-************************************************************************
-"
-};
-
-(:~
- : @return true if the man:resize function works.
- :)
-declare %an:nondeterministic function local:test-resize() as xs:boolean {
- let $resized := man:resize($local:gif, xs:unsignedInt(500), xs:unsignedInt(600))
- let $resized-ref as xs:base64Binary := file:read-binary(concat($local:image-dir, "manipulation/bigBird.gif"))
- return basic:equals($resized, $resized-ref)
-};
-
-
-
-(:~
- : @return true if the man:zoom function works.
- :)
-declare %an:nondeterministic function local:test-zoom() as xs:boolean {
- let $zoomed := man:zoom($local:jpg, 2)
- let $ref-zoomed := file:read-binary(concat($local:image-dir, "manipulation/zoomedBird.jpg"))
- return basic:equals($zoomed, $ref-zoomed)
-};
-
-
-
-
-(:~
- : @return true if the man:zoom-by-width function works.
- :)
-declare %an:nondeterministic function local:test-zoom-by-width() as xs:boolean {
- let $zoomed := man:zoom-by-width($local:jpg, xs:unsignedInt(268))
- let $ref-zoomed := file:read-binary(concat($local:image-dir, "manipulation/zoomedBird.jpg"))
- return basic:equals($zoomed, $ref-zoomed)
-};
-
-(:~
- : @return true if the man:zoom-by-height function works.
- :)
-declare %an:nondeterministic function local:test-zoom-by-height() as xs:boolean {
- let $zoomed := man:zoom-by-height($local:jpg, xs:unsignedInt(320))
- let $ref-zoomed := file:read-binary(concat($local:image-dir, "manipulation/zoomedBird.jpg"))
- return basic:equals($zoomed, $ref-zoomed)
-};
-
-(:~
- : @return true if the man:sub-image function works.
- :)
-declare %an:nondeterministic function local:test-sub-image() as xs:boolean {
- let $sub := man:sub-image($local:jpg, xs:unsignedInt(20), xs:unsignedInt(20), xs:unsignedInt(200), xs:unsignedInt(30))
- let $ref-sub := file:read-binary(concat($local:image-dir, "manipulation/subBird.jpg"))
- return basic:equals($sub, $ref-sub)
-};
-
-(:~
- : @return true if the man:overlay function works.
- :)
-declare %an:nondeterministic function local:test-overlay() {
- let $ref-overlay:= file:read-binary(concat($local:image-dir, "manipulation/overlayBird.jpg"))
- let $ref-zoomed := file:read-binary(concat($local:image-dir, "manipulation/zoomedBird.jpg"))
- return basic:equals(man:overlay($ref-zoomed, $local:png, xs:unsignedInt(50), xs:unsignedInt(50),
- "AtopCompositeOp"), $ref-overlay)
-};
-
-
-
-
-declare %an:nondeterministic %an:sequential function local:main() as xs:string* {
-
- let $a := local:test-resize()
- return
- if (fn:not($a)) then
- exit returning local:error(("Resizing of images failed."));
- else ();
-
-
- let $b := local:test-zoom()
- return
- if (fn:not($b)) then
- exit returning local:error(("Zooming of image failed."));
- else ();
-
-
- let $c := local:test-zoom-by-width()
- return
- if (fn:not($c)) then
- exit returning local:error(("Zooming of image by width failed."));
- else ();
-
- let $d := local:test-zoom-by-height()
- return
- if (fn:not($d)) then
- exit returning local:error(("Zooming of image by height failed."));
- else ();
-
- let $f := local:test-sub-image()
- return
- if (fn:not($f)) then
- exit returning local:error("Extracting sub image failed.");
- else();
-
- let $g := local:test-overlay()
- return
- if (fn:not($g)) then
- exit returning local:error("Overlaying of image failed.");
- else();
- (: If all went well ... make sure the world knows! :)
- "SUCCESS"
-
-};
-
-local:main()
-
=== removed file 'test/Queries/image/manipulation_2.xq'
--- test/Queries/image/manipulation_2.xq 2012-04-11 09:50:23 +0000
+++ test/Queries/image/manipulation_2.xq 1970-01-01 00:00:00 +0000
@@ -1,142 +0,0 @@
-(:~
- : Simple test module for the manipulation functions of the image library.
- :
- : @author Daniel Thomas
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace man = 'http://www.zorba-xquery.com/modules/image/manipulation';
-import schema namespace image = 'http://www.zorba-xquery.com/modules/image/image';
-
-declare namespace an = "http://www.zorba-xquery.com/annotations";
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-declare variable $local:jpg as xs:base64Binary := file:read-binary(concat($local:image-dir, "bird.jpg"));
-
-
-(:~
- : Outputs a nice error message to the screen ...
- :
- : @param $messsage is the message to be displayed
- : @return The passed message but really very, very nicely formatted.
- :)
-declare function local:error($messages as xs:string*) as xs:string* {
- "
-************************************************************************
-ERROR:
- Location:", file:path-to-native("."), "
- Cause:",
- $messages,
- "
-************************************************************************
-"
-};
-
-(:~
- : @return true if the man:rotate function works.
- :)
-declare %an:nondeterministic function local:test-rotate() as xs:boolean {
- let $rotated := man:rotate($local:jpg, xs:int(180))
- let $rotated-ref := file:read-binary(concat($local:image-dir, "manipulation/rotatedBird.jpg"))
- return basic:equals($rotated, $rotated-ref)
-};
-
-
-
-(:~
- : @return true if the man:rotate function works.
- :)
-declare %an:nondeterministic function local:test-erase() as xs:boolean {
- let $erased := man:erase($local:jpg)
- let $erased-ref := file:read-binary(concat($local:image-dir, "manipulation/erased.jpg"))
- return basic:equals($erased, $erased-ref)
-};
-
-(:~
- : @return true if the man:flop function works.
- :)
-declare %an:nondeterministic function local:test-flop() as xs:boolean {
- let $flopped := man:flop($local:jpg)
- let $flopped-ref := file:read-binary(concat($local:image-dir, "manipulation/floppedBird.jpg"))
- return basic:equals($flopped, $flopped-ref)
-};
-
-
-(:~
- : @return true if the man:flip function works.
- :)
-declare %an:nondeterministic function local:test-flip() as xs:boolean {
- let $flipped := man:flip($local:jpg)
- let $flipped-ref := file:read-binary(concat($local:image-dir, "manipulation/flippedBird.jpg"))
- return basic:equals($flipped, $flipped-ref)
-};
-
-(:~
- : @return true if the man:trim function works.
- :)
-declare %an:nondeterministic function local:test-trim() as xs:boolean {
- let $trimmed := man:trim($local:jpg)
- let $trimmed-ref := file:read-binary(concat($local:image-dir, "manipulation/trimmedBird.jpg"))
- return basic:equals($trimmed, $trimmed-ref)
-};
-
-
-
-(:~
- : @return true if the man:blur function works.
- :)
-declare %an:nondeterministic function local:test-blur() as xs:boolean {
- let $blurred := man:blur($local:jpg, xs:int(8), xs:int(-4))
- let $blurred-ref := file:read-binary(concat($local:image-dir, "manipulation/blurredBird.jpg"))
- return basic:equals($blurred, $blurred-ref)
-};
-
-
-
-
-declare %an:nondeterministic %an:sequential function local:main() as xs:string* {
-
- let $a := local:test-rotate()
- return
- if (fn:not($a)) then
- exit returning local:error(("Rotating of images failed."));
- else ();
-
- let $b := local:test-erase()
- return
- if (fn:not($b)) then
- exit returning local:error(("Erasing of images failed."));
- else ();
-
- let $c := local:test-flop()
- return
- if (fn:not($c)) then
- exit returning local:error(("Flop of images failed."));
- else ();
-
- let $d := local:test-flip()
- return
- if (fn:not($d)) then
- exit returning local:error(("Flip of images failed."));
- else ();
-
- let $e := local:test-trim()
- return
- if (fn:not($e)) then
- exit returning local:error(("Trim of images failed."));
- else ();
-
-
- let $g := local:test-blur()
- return
- if (fn:not($g)) then
- exit returning local:error(("Blurring of images failed."));
- else ();
-
- (: If all went well ... make sure the world knows! :)
- "SUCCESS"
-};
-
-local:main()
=== removed file 'test/Queries/image/manipulation_3.xq'
--- test/Queries/image/manipulation_3.xq 2012-04-11 09:50:23 +0000
+++ test/Queries/image/manipulation_3.xq 1970-01-01 00:00:00 +0000
@@ -1,106 +0,0 @@
-(:~
- : Simple test module for the manipulation functions of the image library.
- :
- : @author Daniel Thomas
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace man = 'http://www.zorba-xquery.com/modules/image/manipulation';
-import schema namespace image = 'http://www.zorba-xquery.com/modules/image/image';
-
-declare namespace an = "http://www.zorba-xquery.com/annotations";
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-declare variable $local:jpg as xs:base64Binary := file:read-binary(concat($local:image-dir, "bird.jpg"));
-
-
-(:~
- : Outputs a nice error message to the screen ...
- :
- : @param $messsage is the message to be displayed
- : @return The passed message but really very, very nicely formatted.
- :)
-declare function local:error($messages as xs:string*) as xs:string* {
- "
-************************************************************************
-ERROR:
- Location:", file:path-to-native("."), "
- Cause:",
- $messages,
- "
-************************************************************************
-"
-};
-
-
-
-
-(:~
- : @return true if the man:despecle function works.
- :)
-declare %an:nondeterministic function local:test-despeckle() as xs:boolean {
- let $despeckled := man:despeckle($local:jpg)
- let $despeckled-ref := file:read-binary(concat($local:image-dir, "manipulation/despeckledBird.jpg"))
- return basic:equals($despeckled, $despeckled-ref)
-};
-
-
-(:~
- : @return true if the man:despecle function works.
- :)
-declare %an:nondeterministic function local:test-enhance() as xs:boolean {
- let $enhanced := man:enhance(man:enhance($local:jpg))
- let $enhanced-ref := file:read-binary(concat($local:image-dir, "manipulation/enhancedBird.jpg"))
- return basic:equals($enhanced, $enhanced-ref)
-};
-
-
-
-(:~
- : @return true if the man:charcoal function works.
- :)
-declare %an:nondeterministic function local:test-charcoal() as xs:boolean {
- let $charcoaled := man:charcoal($local:jpg, 0.5, 0.5)
- let $charcoaled-ref := file:read-binary(concat($local:image-dir, "manipulation/charcoaledBird.jpg"))
- return basic:equals($charcoaled, $charcoaled-ref)
-};
-
-
-(:~
- : @return true if the man:solarize function works.
- :)
-declare %an:nondeterministic function local:test-solarize() as xs:boolean {
- let $solarized := man:solarize($local:jpg, 0.3)
- let $solarized-ref := file:read-binary(concat($local:image-dir, "manipulation/solarizedBird.jpg"))
- return basic:equals($solarized, $solarized-ref)
-};
-
-
-declare %an:nondeterministic %an:sequential function local:main() as xs:string* {
-
- let $a := local:test-despeckle()
- return
- if (fn:not($a)) then
- exit returning local:error(("Despecle of images failed."));
- else ();
-
- let $b := local:test-enhance()
- return
- if (fn:not($b)) then
- exit returning local:error(("Enhancing of images failed."));
- else ();
-
-
- let $g := local:test-solarize()
- return
- if (fn:not($g)) then
- exit returning local:error(("Solarize of images failed."));
- else ();
-
- (: If all went well ... make sure the world knows! :)
- "SUCCESS"
-};
-
-local:main()
=== removed file 'test/Queries/image/manipulation_4.xq'
--- test/Queries/image/manipulation_4.xq 2012-04-11 09:50:23 +0000
+++ test/Queries/image/manipulation_4.xq 1970-01-01 00:00:00 +0000
@@ -1,119 +0,0 @@
-(:~
- : Simple test module for the manipulation functions of the image library.
- :
- : @author Daniel Thomas
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace man = 'http://www.zorba-xquery.com/modules/image/manipulation';
-import schema namespace image = 'http://www.zorba-xquery.com/modules/image/image';
-
-declare namespace an = "http://www.zorba-xquery.com/annotations";
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-declare variable $local:gif as xs:base64Binary := file:read-binary(concat($local:image-dir, "bird.gif"));
-declare variable $local:jpg as xs:base64Binary := file:read-binary(concat($local:image-dir, "bird.jpg"));
-
-
-(:~
- : Outputs a nice error message to the screen ...
- :
- : @param $messsage is the message to be displayed
- : @return The passed message but really very, very nicely formatted.
- :)
-declare function local:error($messages as xs:string*) as xs:string* {
- "
-************************************************************************
-ERROR:
- Location:", file:path-to-native("."), "
- Cause:",
- $messages,
- "
-************************************************************************
-"
-};
-
-(:~
- : @return true if the man:stereo function works.
- :)
-declare %an:nondeterministic function local:test-stereo() as xs:boolean {
- let $right-image := man:zoom($local:jpg, 0.9)
- let $stereod := man:stereo($local:jpg, $right-image)
- let $stereod-ref := file:read-binary(concat($local:image-dir, "manipulation/stereodBird.jpg"))
- return basic:equals($stereod, $stereod-ref)
-};
-
-(:~
- : @return true if the man:transparent function works.
- :)
-declare %an:nondeterministic function local:test-transparent() as xs:boolean {
- let $transparented := man:transparent($local:gif, "#000000")
- let $transparented-ref := file:read-binary(concat($local:image-dir, "manipulation/transparentedBird.gif"))
- return basic:equals($transparented, $transparented-ref)
-};
-
-(:~
- : @return true if the man:swirl function works.
- :)
-declare %an:nondeterministic function local:test-swirl() as xs:boolean {
- let $swirled := man:swirl($local:gif, -500)
- let $swirled-ref := file:read-binary(concat($local:image-dir, "manipulation/swirledBird.gif"))
- return basic:equals($swirled, $swirled-ref)
-};
-
-(:~
- : @return true if the man:reduce-noise function works.
- :)
-declare %an:nondeterministic function local:test-reduce-noise() as xs:boolean {
- let $reduced := man:reduce-noise($local:gif, -0.4)
- let $reduced-ref := file:read-binary(concat($local:image-dir, "manipulation/reducedBird.gif"))
- return basic:equals($reduced, $reduced-ref)
-};
-
-
-(:~
- : @return true if the man:contrast function works.
- :)
-declare %an:nondeterministic function local:test-contrast() as xs:boolean {
- let $contrasted := man:contrast($local:gif, 0.8)
- let $contrasted-ref := file:read-binary(concat($local:image-dir, "manipulation/contrastedBird.gif"))
- return basic:equals($contrasted, $contrasted-ref)
-};
-
-
-declare %an:nondeterministic %an:sequential function local:main() as xs:string* {
-
- let $a := local:test-stereo()
- return
- if (fn:not($a)) then
- exit returning local:error(("Stereo of images failed."));
- else ();
-
-
- let $b := local:test-transparent()
- return
- if (fn:not($b)) then
- exit returning local:error(("Making a color of an image tranparent failed."));
- else ();
-
-
- let $c := local:test-swirl()
- return
- if (fn:not($c)) then
- exit returning local:error(("Swirl of image failed."));
- else ();
-
-
- let $e := local:test-contrast()
- return
- if (fn:not($e)) then
- exit returning local:error(("Contrasting image failed."));
- else ();
-
- (: If all went well ... make sure the world knows! :)
- "SUCCESS"
-};
-
-local:main()
=== removed file 'test/Queries/image/manipulation_5.xq'
--- test/Queries/image/manipulation_5.xq 2012-04-11 09:50:23 +0000
+++ test/Queries/image/manipulation_5.xq 1970-01-01 00:00:00 +0000
@@ -1,123 +0,0 @@
-(:~
- : Simple test module for the manipulation functions of the image library.
- :
- : @author Daniel Thomas
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace man = 'http://www.zorba-xquery.com/modules/image/manipulation';
-import schema namespace image = 'http://www.zorba-xquery.com/modules/image/image';
-
-declare namespace an = "http://www.zorba-xquery.com/annotations";
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-declare variable $local:png as xs:base64Binary := file:read-binary(concat($local:image-dir, "bird.png"));
-declare variable $local:gif as xs:base64Binary := file:read-binary(concat($local:image-dir, "bird.gif"));
-declare variable $local:tiff as xs:base64Binary := file:read-binary(concat($local:image-dir, "bird.tiff"));
-declare variable $local:jpg as xs:base64Binary := file:read-binary(concat($local:image-dir, "bird.jpg"));
-
-
-(:~
- : Outputs a nice error message to the screen ...
- :
- : @param $messsage is the message to be displayed
- : @return The passed message but really very, very nicely formatted.
- :)
-declare function local:error($messages as xs:string*) as xs:string* {
- "
-************************************************************************
-ERROR:
- Location:", file:path-to-native("."), "
- Cause:",
- $messages,
- "
-************************************************************************
-"
-};
-
-(:~
- : @return true if the man:gamma function works.
- :)
-declare %an:nondeterministic function local:test-gamma() as xs:boolean {
- let $gamma1 := man:gamma($local:gif, 1.8)
- let $gamma1-ref := file:read-binary(concat($local:image-dir, "manipulation/gamma1Bird.gif"))
- return basic:equals($gamma1, $gamma1-ref)
-};
-
-(:~
- : @return true if the man:gamma with seperate values for each color (rgb) function works.
- :)
-declare %an:nondeterministic function local:test-gamma-rgb() as xs:boolean {
- let $gamma2 := man:gamma($local:gif, 1.8, 4, 1)
- let $gamma2-ref := file:read-binary(concat($local:image-dir, "manipulation/gamma2Bird.gif"))
- return basic:equals($gamma2, $gamma2-ref)
-};
-
-(:~
- : @return true if the man:implode function works.
- :)
-declare %an:nondeterministic function local:test-implode() as xs:boolean {
- let $implode := man:implode($local:gif, 0.6)
- let $implode-ref := file:read-binary(concat($local:image-dir, "manipulation/implodeBird.gif"))
- return basic:equals($implode, $implode-ref)
-};
-
-(:~
- : @return true if the man:oil-paint function works.
- :)
-declare %an:nondeterministic function local:test-oil-paint() as xs:boolean {
- let $oil-paint := man:oil-paint($local:gif, 0.6)
- let $oil-paint-ref := file:read-binary(concat($local:image-dir, "manipulation/oilPaintBird.gif"))
- return basic:equals($oil-paint, $oil-paint-ref)
-};
-
-(:~
- : @return true if the man:watermark function works.
- :)
-declare %an:nondeterministic function local:test-watermark() as xs:boolean {
- let $watermark := man:watermark($local:gif, $local:jpg)
- let $watermark-ref := file:read-binary(concat($local:image-dir, "manipulation/watermarked.gif"))
- return basic:equals($watermark, $watermark-ref)
-
-};
-
-
-declare %an:nondeterministic %an:sequential function local:main() as xs:string* {
-
- let $a := local:test-gamma()
- return
- if (fn:not($a)) then
- exit returning local:error(("Gamma correction of images failed."));
- else ();
-
- let $b := local:test-gamma-rgb()
- return
- if (fn:not($b)) then
- exit returning local:error(("Gamma correction of images failed."));
- else ();
-
- let $c := local:test-implode()
- return
- if (fn:not($c)) then
- exit returning local:error(("Implode of images failed."));
- else ();
-
- let $d := local:test-oil-paint()
- return
- if (fn:not($d)) then
- exit returning local:error(("Oil paint of images failed."));
- else ();
-
- let $e := local:test-watermark()
- return
- if (fn:not($e)) then
- exit returning local:error(("Applying watermark to image failed."));
- else ();
-
- (: If all went well ... make sure the world knows! :)
- "SUCCESS"
-};
-
-local:main()
=== removed file 'test/Queries/image/manipulation_add_noise.xq'
--- test/Queries/image/manipulation_add_noise.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_add_noise.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk and adds Uniform Noise to the image
- : using the add noise function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write-binary(a_path, $noise-image), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $noise-image := manipulation:add-noise($bird, "UniformNoise")
-return not(empty($noise-image))
-
=== removed file 'test/Queries/image/manipulation_blur.xq'
--- test/Queries/image/manipulation_blur.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_blur.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk and blurs the image
- : using the blur function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write-binary(a_path, $blurred-image), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $blurred-image := manipulation:blur($bird, xs:int(0), xs:int(2))
-return not(empty($blurred-image))
-
=== removed file 'test/Queries/image/manipulation_charcoal.xq'
--- test/Queries/image/manipulation_charcoal.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_charcoal.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk and applies a charcoal effect to the image
- : making it look as if it was painted with charcoal pencils using the edge function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write-binary(a_path, $charcoaled-image), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $charcoaled-image := manipulation:charcoal($bird, 0, 1)
-return not(empty($charcoaled-image))
-
=== removed file 'test/Queries/image/manipulation_chop.xq'
--- test/Queries/image/manipulation_chop.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_chop.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk and chops away everything that is left of 50px or above 50px
- : using the chop function from the image/manipulation module.
- : This equivalent to doing sub-image($bird, 50, 50, basic:width($bird), basic:height($bird)).
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write-binary(a_path, $chopped-image), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $chopped-image := manipulation:chop($bird, xs:unsignedInt(50), xs:unsignedInt(50))
-return not(empty($chopped-image))
=== removed file 'test/Queries/image/manipulation_contrast.xq'
--- test/Queries/image/manipulation_contrast.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_contrast.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk,
- : and sharpens the image using the contrast function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write-binary(a_path, $contrasted-image), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $contrasted-image := manipulation:contrast($bird, 2)
-return not(empty($contrasted-image))
-
=== removed file 'test/Queries/image/manipulation_crop.xq'
--- test/Queries/image/manipulation_crop.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_crop.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk and crops away everything that is right of 50px or under 50px
- : using the crop function from the image/manipulation module.
- : This equivalent to doing sub-image($bird, 0, 0, 50, 50).
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write-binary(a_path, $cropped-image), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $cropped-image := manipulation:crop($bird, xs:unsignedInt(50), xs:unsignedInt(50))
-return not(empty($cropped-image))
=== removed file 'test/Queries/image/manipulation_despeckle.xq'
--- test/Queries/image/manipulation_despeckle.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_despeckle.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk and despleckles the image
- : using the despeckle function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write-binary(a_path, $despeckled-image), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $despeckle-image := manipulation:despeckle($bird)
-return not(empty($despeckle-image))
-
=== removed file 'test/Queries/image/manipulation_edge.xq'
--- test/Queries/image/manipulation_edge.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_edge.xq 1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
-(:~
- : This example uses the file module read an image from disk and highlights the edges of the image
- : using the edge function from the image/manipulation module.
- : As the passed radius is 0, the function tries to find the optimal radius automatically.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write-binary(a_path, $edged-image), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $edged-image := manipulation:edge($bird, xs:unsignedInt(0))
-return not(empty($edged-image))
-
=== removed file 'test/Queries/image/manipulation_emboss.xq'
--- test/Queries/image/manipulation_emboss.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_emboss.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk and highlights the edges of the image with a 3-D effect
- : emboss function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write-binary(a_path, $embossed-image), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $embossed-image := manipulation:emboss($bird, 0, 1)
-return not(empty($embossed-image))
-
=== removed file 'test/Queries/image/manipulation_enhance.xq'
--- test/Queries/image/manipulation_enhance.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_enhance.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk and enhances the image
- : using the enhance function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write-binary(a_path, $enhanced-image), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $enhanced-image := manipulation:enhance($bird)
-return not(empty($enhanced-image))
-
=== removed file 'test/Queries/image/manipulation_equalize.xq'
--- test/Queries/image/manipulation_equalize.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_equalize.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk and equalizes the image
- : using the equalize function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $enhanced-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $equalize-image := manipulation:equalize($bird)
-return not(empty($equalize-image))
-
=== removed file 'test/Queries/image/manipulation_erase.xq'
--- test/Queries/image/manipulation_erase.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_erase.xq 1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
-(:~
- : This example uses the file module read an image from disk and erases it (sets the color of all pixels to the current background color)
- : using the erase function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $erased-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $erased-image := manipulation:erase($bird)
-return not(empty($erased-image))
=== removed file 'test/Queries/image/manipulation_flip.xq'
--- test/Queries/image/manipulation_flip.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_flip.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk and flips the image (reflects each scanline in the vertical directio)
- : using the flip function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $flip-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $flipped-image := manipulation:flip($bird)
-return not(empty($flipped-image))
-
=== removed file 'test/Queries/image/manipulation_flop.xq'
--- test/Queries/image/manipulation_flop.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_flop.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk and flops the image (reflects each scanline in the horizontal directio)
- : using the flop function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $flop-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $flopped-image := manipulation:flop($bird)
-return not(empty($flopped-image))
-
=== removed file 'test/Queries/image/manipulation_gamma.xq'
--- test/Queries/image/manipulation_gamma.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_gamma.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk,
- : and gamma corrects the image using the gamma function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $gamma-corrected-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $gamma-corrected-image := manipulation:gamma($bird, 2)
-return not(empty($gamma-corrected-image))
-
=== removed file 'test/Queries/image/manipulation_gamma2.xq'
--- test/Queries/image/manipulation_gamma2.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_gamma2.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk,
- : and gamma corrects the red and blue color channels of the image using the gamma function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $gamma-corrected-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $gamma-corrected-image := manipulation:gamma($bird, 2, 2, 0)
-return not(empty($gamma-corrected-image))
-
=== removed file 'test/Queries/image/manipulation_implode.xq'
--- test/Queries/image/manipulation_implode.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_implode.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk,
- : applies the implode effect on the image using the implode function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $imploded-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $imploded-image := manipulation:implode($bird, 2)
-return not(empty($imploded-image))
-
=== removed file 'test/Queries/image/manipulation_oil_paint.xq'
--- test/Queries/image/manipulation_oil_paint.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_oil_paint.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk,
- : then makes the image look as if it was painted in oil using the oil-paint function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $oil-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $oil-image := manipulation:oil-paint($bird, 2)
-return not(empty($oil-image))
-
=== removed file 'test/Queries/image/manipulation_overlay.xq'
--- test/Queries/image/manipulation_overlay.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_overlay.xq 1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
-(:~
- : This example uses the file module to reads 2 images from disk and lays one over the other using the overlay function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $overlayed-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $bird-to-overlay as xs:base64Binary := file:read-binary(concat($local:image-dir, "/manipulation/subBird.jpg"))
-let $overlayed-image := manipulation:overlay($bird, $bird-to-overlay, xs:unsignedInt(30), xs:unsignedInt(40), "OverCompositeOp")
-return not(empty($overlayed-image))
=== removed file 'test/Queries/image/manipulation_reduce_noise.xq'
--- test/Queries/image/manipulation_reduce_noise.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_reduce_noise.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk,
- : and and reduces the noise using the reduce-noise function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $less-noisy-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $less-noisy-image := manipulation:reduce-noise($bird, 2)
-return not(empty($less-noisy-image))
-
=== removed file 'test/Queries/image/manipulation_resize.xq'
--- test/Queries/image/manipulation_resize.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_resize.xq 1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
-(:~
- : This example uses the file module to read an image from disk and resizes the image using the resize function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty, in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $resized-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $resized-image := manipulation:resize($bird, xs:unsignedInt(20), xs:unsignedInt(20))
-return not(empty($resized-image))
=== removed file 'test/Queries/image/manipulation_rotate.xq'
--- test/Queries/image/manipulation_rotate.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_rotate.xq 1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
-(:~
- : This example uses the file module read an image from disk and rotates the image by 90 degrees clockwise
- : using the rotate function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $rotated-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $rotated-image := manipulation:rotate($bird, xs:int(90))
-return not(empty($rotated-image))
=== removed file 'test/Queries/image/manipulation_solarize.xq'
--- test/Queries/image/manipulation_solarize.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_solarize.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk and solarizes the image, giving it a similar effect
- : as exposing a photographic film to light during the development using the solarize function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $solarized-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $solarized-image := manipulation:solarize($bird, 2)
-return not(empty($solarized-image))
-
=== removed file 'test/Queries/image/manipulation_stereo.xq'
--- test/Queries/image/manipulation_stereo.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_stereo.xq 1970-01-01 00:00:00 +0000
@@ -1,19 +0,0 @@
-(:~
- : This example uses the file module read an image from disk, makes a zoomed version of it
- : and lies both images over each other to create a stereo image using the stereo function from the image/manipulation module.
- : To view such an image correctly one would need a red/blue 3D glasses.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $stereo-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $zoomed-bird as xs:base64Binary := manipulation:zoom($bird, 0.9)
-let $stereo-image := manipulation:stereo($bird, $zoomed-bird)
-return not(empty($stereo-image))
-
=== removed file 'test/Queries/image/manipulation_sub_image.xq'
--- test/Queries/image/manipulation_sub_image.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_sub_image.xq 1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
-(:~
- : This example uses the file module to read an image from disk and extracts a sub image using the sub-image function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $zoomed-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-(: double the image size by zooming :)
-let $sub-image := manipulation:sub-image($bird, xs:unsignedInt(10), xs:unsignedInt(10), xs:unsignedInt(40), xs:unsignedInt(40))
-return not(empty($sub-image))
-
=== removed file 'test/Queries/image/manipulation_swirl.xq'
--- test/Queries/image/manipulation_swirl.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_swirl.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk,
- : and rotates the pixels of the image by 90 degrees using the swirl function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $swirled-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $swirled-image := manipulation:swirl($bird, 90)
-return not(empty($swirled-image))
-
=== removed file 'test/Queries/image/manipulation_transparent.xq'
--- test/Queries/image/manipulation_transparent.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_transparent.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk,
- : and makes the white pixels of this image transparent using the transparent function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $transparent-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $transparent-image := manipulation:transparent($bird, "#FFFFFF")
-return not(empty($transparent-image))
-
=== removed file 'test/Queries/image/manipulation_trim.xq'
--- test/Queries/image/manipulation_trim.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_trim.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example uses the file module read an image from disk and trims the image
- : using the trim function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $trimmed-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $trimmed-image := manipulation:trim($bird)
-return not(empty($trimmed-image))
-
=== removed file 'test/Queries/image/manipulation_watermark.xq'
--- test/Queries/image/manipulation_watermark.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_watermark.xq 1970-01-01 00:00:00 +0000
@@ -1,18 +0,0 @@
-(:~
- : This example uses the file module read an image from disk, makes a much smaller version of the loaded image and
- : then uses the smaller version of the image as watermark for the normal version using the watermark function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $watermarked-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $watermark as xs:base64Binary := manipulation:zoom($bird, 0.1)
-let $watermarked-image := manipulation:watermark($bird, $watermark)
-return not(empty($watermarked-image))
-
=== removed file 'test/Queries/image/manipulation_zoom.xq'
--- test/Queries/image/manipulation_zoom.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_zoom.xq 1970-01-01 00:00:00 +0000
@@ -1,15 +0,0 @@
-(:~
- : This example uses the file module to read an image from disk and zooms the image by a scale factor of 2 using the zoom function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty, in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $zoomed-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-(: double the image size by zooming :)
-let $zoomed-image := manipulation:zoom($bird, 2)
-return not(empty($zoomed-image))
=== removed file 'test/Queries/image/manipulation_zoom_height.xq'
--- test/Queries/image/manipulation_zoom_height.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_zoom_height.xq 1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
-(:~
- : This example uses the file module to read an image from disk and zooms the image by its width using the zoom-by-width function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $zoomed-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $zoomed-image := manipulation:zoom-by-width($bird, xs:unsignedInt(580))
-return not(empty($zoomed-image))
=== removed file 'test/Queries/image/manipulation_zoom_width.xq'
--- test/Queries/image/manipulation_zoom_width.xq 2011-10-06 08:18:47 +0000
+++ test/Queries/image/manipulation_zoom_width.xq 1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
-(:~
- : This example uses the file module to read an image from disk and zooms the image by its width using the zoom-by-width function from the image/manipulation module.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty,
- : in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $zoomed-image, <method>binary</method>), send it in an email etc.
- :)
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace manipulation = 'http://www.zorba-xquery.com/modules/image/manipulation';
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-let $bird as xs:base64Binary := file:read-binary(concat($local:image-dir, "/bird.jpg"))
-let $zoomed-image := manipulation:zoom-by-width($bird, xs:unsignedInt(580))
-return not(empty($zoomed-image))
=== removed file 'test/Queries/image/paint_1.xq'
--- test/Queries/image/paint_1.xq 2012-04-11 09:50:23 +0000
+++ test/Queries/image/paint_1.xq 1970-01-01 00:00:00 +0000
@@ -1,115 +0,0 @@
-(:~
- : Simple test module for the paint functions of the image library.
- :
- : @author Daniel Thomas
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace paint = 'http://www.zorba-xquery.com/modules/image/paint';
-import schema namespace image = 'http://www.zorba-xquery.com/modules/image/image';
-
-declare namespace an = "http://www.zorba-xquery.com/annotations";
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-declare variable $local:gif as xs:base64Binary := basic:create(xs:unsignedInt(100), xs:unsignedInt(100), image:imageFormat("GIF"));
-
-
-(:~
- : Outputs a nice error message to the screen ...
- :
- : @param $messsage is the message to be displayed
- : @return The passed message but really very, very nicely formatted.
- :)
-declare function local:error($messages as xs:string*) as xs:string* {
- "
-************************************************************************
-ERROR:
- Location:", file:path-to-native("."), "
- Cause:",
- $messages,
- "
-************************************************************************
-"
-};
-
-
-(:~
- : @return true if the man:draw-line function works.
- :)
-declare %an:nondeterministic function local:test-draw-line() as xs:boolean {
- let $draw := paint:paint($local:gif, <image:line><image:start><image:x>-20</image:x><image:y>-20</image:y></image:start><image:end><image:x>80</image:x><image:y>80</image:y></image:end></image:line>)
- let $draw-ref := file:read-binary(concat($local:image-dir,"paint/line.gif"))
- return basic:equals($draw, $draw-ref)
-};
-
-declare %an:nondeterministic function local:test-draw-line-color-red() {
- let $draw := paint:paint($local:gif, <image:line><image:strokeColor>#6F0000</image:strokeColor><image:start><image:x>0</image:x><image:y>0</image:y></image:start><image:end><image:x>80</image:x><image:y>80</image:y></image:end></image:line>)
- let $draw-ref := file:read-binary(concat($local:image-dir,"paint/redLine.gif"))
- return basic:equals($draw, $draw-ref)
-
-};
-
-declare %an:nondeterministic function local:test-draw-line-color-green() {
- let $draw := paint:paint($local:gif, <image:line><image:strokeColor>#006F00</image:strokeColor><image:start><image:x>0</image:x><image:y>0</image:y></image:start><image:end><image:x>80</image:x><image:y>80</image:y></image:end></image:line>)
-
- let $draw-ref := file:read-binary(concat($local:image-dir,"paint/greenLine.gif"))
- return basic:equals($draw, $draw-ref)
-
-};
-
-declare %an:nondeterministic function local:test-draw-line-color-blue() {
- let $draw := paint:paint($local:gif, <image:line><image:strokeColor>#00006F</image:strokeColor><image:start><image:x>0</image:x><image:y>0</image:y></image:start><image:end><image:x>80</image:x><image:y>80</image:y></image:end></image:line>)
- let $draw-ref := file:read-binary(concat($local:image-dir,"paint/blueLine.gif"))
- return basic:equals($draw, $draw-ref)
-
-};
-
-declare %an:nondeterministic function local:test-stroke-width() {
- let $draw := paint:paint($local:gif, (<image:line><image:strokeWidth>10</image:strokeWidth><image:strokeColor>#000000</image:strokeColor><image:start><image:x>0</image:x><image:y>0</image:y></image:start><image:end><image:x>80</image:x><image:y>80</image:y></image:end></image:line>,<image:line><image:strokeColor>#FF00FF</image:strokeColor><image:start><image:x>30</image:x><image:y>0</image:y></image:start><image:end><image:x>70</image:x><image:y>90</image:y></image:end></image:line>))
- let $draw-ref := file:read-binary(concat($local:image-dir,"paint/wideLine.gif"))
- return basic:equals($draw, $draw-ref)
-
-};
-
-
-
-
-declare %an:nondeterministic %an:sequential function local:main() as xs:string* {
-
- let $a := local:test-draw-line()
- return
- if (fn:not($a)) then
- exit returning local:error(("Drawing a line on an image failed."));
- else ();
-
- let $b := local:test-draw-line-color-red()
- return
- if (fn:not($b)) then
- exit returning local:error(("Drawing a red (#6F0000) line on an image failed."));
- else ();
-
- let $c := local:test-draw-line-color-green()
- return
- if (fn:not($c)) then
- exit returning local:error(("Drawing a green (#006F00) line on an image failed."));
- else ();
-
- let $d := local:test-draw-line-color-blue()
- return
- if (fn:not($d)) then
- exit returning local:error(("Drawing a blue (#00006F) line on an image failed."));
- else ();
-
- let $e := local:test-stroke-width()
- return
- if (fn:not($e)) then
- exit returning local:error(("Setting stroke width of an image failed."));
- else ();
-
- (: If all went well ... make sure the world knows! :)
- "SUCCESS"
-};
-
-local:main()
=== removed file 'test/Queries/image/paint_2.xq'
--- test/Queries/image/paint_2.xq 2012-04-11 09:50:23 +0000
+++ test/Queries/image/paint_2.xq 1970-01-01 00:00:00 +0000
@@ -1,110 +0,0 @@
-(:~
- : Simple test module for the paint functions of the image library.
- :
- : @author Daniel Thomas
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace paint = 'http://www.zorba-xquery.com/modules/image/paint';
-import schema namespace img = 'http://www.zorba-xquery.com/modules/image/image';
-
-declare namespace an = "http://www.zorba-xquery.com/annotations";
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-declare variable $local:gif as xs:base64Binary := basic:create(xs:unsignedInt(100), xs:unsignedInt(100), img:imageFormat("GIF"));
-
-
-(:~
- : Outputs a nice error message to the screen ...
- :
- : @param $messsage is the message to be displayed
- : @return The passed message but really very, very nicely formatted.
- :)
-declare function local:error($messages as xs:string*) as xs:string* {
- "
-************************************************************************
-ERROR:
- Location:", file:path-to-native("."), "
- Cause:",
- $messages,
- "
-************************************************************************
-"
-};
-
-
-declare %an:nondeterministic function local:test-draw-poly-line() as xs:boolean
-{
- let $draw := paint:paint($local:gif, <img:polyLine><img:point><img:x>10</img:x><img:y>10</img:y></img:point><img:point><img:x>40</img:x><img:y>80</img:y></img:point><img:point><img:x>50</img:x><img:y>30</img:y></img:point><img:point><img:x>200</img:x><img:y>200</img:y></img:point></img:polyLine>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/polyLine.gif"))
- return basic:equals($draw, $draw-ref)
-};
-
-declare %an:nondeterministic function local:test-draw-poly-line-anti-aliased() as xs:boolean
-{
- let $draw := paint:paint($local:gif, <img:polyLine><img:antiAliasing>true</img:antiAliasing><img:point><img:x>10</img:x><img:y>10</img:y></img:point><img:point><img:x>40</img:x><img:y>80</img:y></img:point><img:point><img:x>50</img:x><img:y>30</img:y></img:point></img:polyLine>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/polyLineAntiAliased.gif"))
- return basic:equals($draw, $draw-ref)
-};
-
-
-(:~
- : @return true if the man:draw-poly-line function works.
- :)
-declare %an:nondeterministic function local:test-draw-poly-line-red() as xs:boolean
-{
- let $draw := paint:paint($local:gif, <img:polyLine><img:strokeColor>#FF0000</img:strokeColor><img:antiAliasing>true</img:antiAliasing><img:point><img:x>10</img:x><img:y>10</img:y></img:point><img:point><img:x>40</img:x><img:y>80</img:y></img:point><img:point><img:x>50</img:x><img:y>30</img:y></img:point></img:polyLine>)
-
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/polyLineRed.gif"))
- return basic:equals($draw, $draw-ref)
-};
-
-
-(:~
- : @return true if the man:draw-poly-line function works.
- :)
-declare %an:nondeterministic function local:test-draw-poly-line-wide() as xs:boolean {
- let $draw := paint:paint($local:gif, <img:polyLine><img:strokeWidth>5</img:strokeWidth><img:antiAliasing>true</img:antiAliasing><img:point><img:x>10</img:x><img:y>10</img:y></img:point><img:point><img:x>40</img:x><img:y>80</img:y></img:point><img:point><img:x>50</img:x><img:y>30</img:y></img:point></img:polyLine>)
-
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/polyLineWide.gif"))
- return basic:equals($draw, $draw-ref)
-};
-
-
-
-declare %an:nondeterministic %an:sequential function local:main() as xs:string* {
-
-
- let $a := local:test-draw-poly-line()
- return
- if (fn:not($a)) then
- exit returning local:error(("Drawing a poly-line on an image failed."));
- else ();
-
- let $b := local:test-draw-poly-line-anti-aliased()
- return
- if (fn:not($b)) then
- exit returning local:error(("Drawing a anti-aliased poly-line on an image failed."));
- else ();
-
- let $c := local:test-draw-poly-line-red()
- return
- if (fn:not($c)) then
- exit returning local:error(("Drawing a red poly-line on an image failed."));
- else ();
-
- let $d := local:test-draw-poly-line-wide()
- return
- if (fn:not($d)) then
- exit returning local:error(("Drawing wide poly-line on an image failed."));
- else ();
-
- (: If all went well ... make sure the world knows! :)
- "SUCCESS"
-
-};
-
-local:main()
-
=== removed file 'test/Queries/image/paint_3.xq'
--- test/Queries/image/paint_3.xq 2012-04-11 09:50:23 +0000
+++ test/Queries/image/paint_3.xq 1970-01-01 00:00:00 +0000
@@ -1,106 +0,0 @@
-(:~
- : Simple test module for the paint functions of the image library.
- :
- : @author Daniel Thomas
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace paint = 'http://www.zorba-xquery.com/modules/image/paint';
-import schema namespace img = 'http://www.zorba-xquery.com/modules/image/image';
-
-declare namespace an = "http://www.zorba-xquery.com/annotations";
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-declare variable $local:gif as xs:base64Binary := basic:create(xs:unsignedInt(100), xs:unsignedInt(100), img:imageFormat("GIF"));
-
-
-(:~
- : Outputs a nice error message to the screen ...
- :
- : @param $messsage is the message to be displayed
- : @return The passed message but really very, very nicely formatted.
- :)
-declare function local:error($messages as xs:string*) as xs:string* {
- "
-************************************************************************
-ERROR:
- Location:", file:path-to-native("."), "
- Cause:",
- $messages,
- "
-************************************************************************
-"
-};
-
-
-(:~
- : @return true if the man:draw-stroked-poly-line function works.
- :)
-declare %an:nondeterministic function local:test-draw-stroked-poly-line() as xs:boolean {
- let $draw := paint:paint($local:gif, <img:strokedPolyLine><img:point><img:x>10</img:x><img:y>10</img:y></img:point><img:point><img:x>40</img:x><img:y>80</img:y></img:point><img:point><img:x>50</img:x><img:y>30</img:y></img:point><img:strokeLength>5</img:strokeLength><img:gapLength>2</img:gapLength></img:strokedPolyLine>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/polyLineStroked.gif"))
- return basic:equals($draw, $draw-ref)
-};
-
-
-(:~
- : @return true if the man:draw-stroked-poly-line function works.
- :)
-declare %an:nondeterministic function local:test-draw-stroked-poly-line-blue() as xs:boolean {
- let $draw := paint:paint($local:gif, <img:strokedPolyLine><img:strokeColor>#0000FF</img:strokeColor><img:point><img:x>10</img:x><img:y>10</img:y></img:point><img:point><img:x>40</img:x><img:y>80</img:y></img:point><img:point><img:x>50</img:x><img:y>30</img:y></img:point><img:strokeLength>5</img:strokeLength><img:gapLength>2</img:gapLength></img:strokedPolyLine>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/polyLineStrokedBlue.gif"))
- return basic:equals($draw, $draw-ref)
-};
-
-(:~
- : @return true if the man:draw-stroked-poly-line function works.
- :)
-declare %an:nondeterministic function local:test-draw-stroked-poly-line-wide() as xs:boolean {
- let $draw := paint:paint($local:gif, <img:strokedPolyLine><img:strokeWidth>4</img:strokeWidth><img:point><img:x>10</img:x><img:y>10</img:y></img:point><img:point><img:x>40</img:x><img:y>80</img:y></img:point><img:point><img:x>50</img:x><img:y>30</img:y></img:point><img:strokeLength>5</img:strokeLength><img:gapLength>2</img:gapLength></img:strokedPolyLine>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/polyLineStrokedWide.gif"))
- return basic:equals($draw, $draw-ref)
-};
-
-(:~
- : @return true if the man:draw-stroked-poly-line function works.
- :)
-declare %an:nondeterministic function local:test-draw-stroked-poly-line-anti-aliased() as xs:boolean {
- let $draw := paint:paint($local:gif, <img:strokedPolyLine><img:antiAliasing>true</img:antiAliasing><img:point><img:x>10</img:x><img:y>10</img:y></img:point><img:point><img:x>40</img:x><img:y>80</img:y></img:point><img:point><img:x>50</img:x><img:y>30</img:y></img:point><img:strokeLength>5</img:strokeLength><img:gapLength>2</img:gapLength></img:strokedPolyLine>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/polyLineStrokedAntiAliased.gif"))
- return basic:equals($draw, $draw-ref)
-};
-
-declare %an:nondeterministic %an:sequential function local:main() as xs:string* {
-
- let $a := local:test-draw-stroked-poly-line()
- return
- if (fn:not($a)) then
- exit returning local:error(("Drawing a stroked poly-line on an image failed."));
- else ();
-
- let $b := local:test-draw-stroked-poly-line-blue()
- return
- if (fn:not($b)) then
- exit returning local:error(("Drawing a blue stroked poly-line on an image failed."));
- else ();
-
- let $c := local:test-draw-stroked-poly-line-wide()
- return
- if (fn:not($c)) then
- exit returning local:error(("Drawing a wide stroked poly-line on an image failed."));
- else ();
-
- let $d := local:test-draw-stroked-poly-line-anti-aliased()
- return
- if (fn:not($d)) then
- exit returning local:error(("Drawing a anti-aliased stroked poly-line on an image failed."));
- else ();
-
-
- (: If all went well ... make sure the world knows! :)
- "SUCCESS"
-};
-
-local:main()
=== removed file 'test/Queries/image/paint_4.xq'
--- test/Queries/image/paint_4.xq 2012-04-11 09:50:23 +0000
+++ test/Queries/image/paint_4.xq 1970-01-01 00:00:00 +0000
@@ -1,168 +0,0 @@
-(:~
- : Simple test module for the paint functions of the image library.
- :
- : @author Daniel Thomas
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace paint = 'http://www.zorba-xquery.com/modules/image/paint';
-import schema namespace image = 'http://www.zorba-xquery.com/modules/image/image';
-
-declare namespace an = "http://www.zorba-xquery.com/annotations";
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-declare variable $local:gif as xs:base64Binary := basic:create(xs:unsignedInt(100), xs:unsignedInt(100), image:imageFormat("GIF"));
-
-
-(:~
- : Outputs a nice error message to the screen ...
- :
- : @param $messsage is the message to be displayed
- : @return The passed message but really very, very nicely formatted.
- :)
-declare function local:error($messages as xs:string*) as xs:string* {
- "
-************************************************************************
-ERROR:
- Location:", file:path-to-native("."), "
- Cause:",
- $messages,
- "
-************************************************************************
-"
-};
-
-
-(:~
- : @return true if the man:draw-rectangle function works.
- :)
-declare %an:nondeterministic function local:test-draw-rectangle() as xs:boolean {
- let $draw := paint:paint($local:gif, <image:rectangle><image:upperLeft><image:x>20</image:x><image:y>20</image:y></image:upperLeft><image:lowerRight><image:x>50</image:x><image:y>50</image:y></image:lowerRight></image:rectangle>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/rectangle.gif"))
- return basic:equals($draw, $draw-ref)
-};
-
-(:~
- : @return true if the man:draw-rectangle function works.
- :)
-declare %an:nondeterministic function local:test-draw-rectangle-green() as xs:boolean {
- let $draw := paint:paint($local:gif, <image:rectangle><image:strokeColor>#00AF00</image:strokeColor><image:upperLeft><image:x>20</image:x><image:y>20</image:y></image:upperLeft><image:lowerRight><image:x>50</image:x><image:y>50</image:y></image:lowerRight></image:rectangle>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/rectangleGreen.gif"))
- return basic:equals($draw, $draw-ref)
-};
-
-
-(:~
- : @return true if the man:draw-rectangle function works.
- :)
-declare %an:nondeterministic function local:test-draw-rectangle-green-red() as xs:boolean {
- let $draw := paint:paint($local:gif, <image:rectangle><image:strokeColor>#00AF00</image:strokeColor><image:fillColor>#A10000</image:fillColor><image:upperLeft><image:x>20</image:x><image:y>20</image:y></image:upperLeft><image:lowerRight><image:x>50</image:x><image:y>50</image:y></image:lowerRight></image:rectangle>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/rectangleGreenRed.gif"))
- return basic:equals($draw, $draw-ref)
-};
-
-
-(:~
- : @return true if the man:draw-rectangle function works.
- :)
-declare %an:nondeterministic function local:test-draw-rectangle-anti-aliased() as xs:boolean {
- let $draw := paint:paint($local:gif, <image:rectangle><image:strokeWidth>5</image:strokeWidth><image:strokeColor>#00AF00</image:strokeColor><image:fillColor>#A10000</image:fillColor><image:antiAliasing>true</image:antiAliasing><image:upperLeft><image:x>20</image:x><image:y>20</image:y></image:upperLeft><image:lowerRight><image:x>50</image:x><image:y>50</image:y></image:lowerRight></image:rectangle>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/rectangleAntiAliased.gif"))
- return basic:equals($draw, $draw-ref)
-};
-
-(:~
- : @return true if the man:draw-rounded-rectangle function works.
- :)
-declare %an:nondeterministic function local:test-draw-rounded-rectangle() as xs:boolean {
- let $draw := paint:paint($local:gif, <image:roundedRectangle><image:upperLeft><image:x>20</image:x><image:y>20</image:y></image:upperLeft><image:lowerRight><image:x>50</image:x><image:y>50</image:y></image:lowerRight><image:cornerWidth>10</image:cornerWidth><image:cornerHeight>10</image:cornerHeight></image:roundedRectangle>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/rectangleRounded.gif"))
- return basic:equals($draw, $draw-ref)
-};
-
-(:~
- : @return true if the man:draw-rounded-rectangle function works.
- :)
-declare %an:nondeterministic function local:test-draw-rounded-rectangle-blue() as xs:boolean {
- let $draw := paint:paint($local:gif, <image:roundedRectangle><image:strokeColor>#0000FF</image:strokeColor><image:upperLeft><image:x>20</image:x><image:y>20</image:y></image:upperLeft><image:lowerRight><image:x>50</image:x><image:y>50</image:y></image:lowerRight><image:cornerWidth>10</image:cornerWidth><image:cornerHeight>10</image:cornerHeight></image:roundedRectangle>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/rectangleRoundedBlue.gif"))
- return basic:equals($draw, $draw-ref)
-};
-
-
-(:~
- : @return true if the man:draw-rounded-rectangle function works.
- :)
-declare %an:nondeterministic function local:test-draw-rounded-rectangle-blue-green() as xs:boolean {
- let $draw := paint:paint($local:gif, <image:roundedRectangle><image:strokeColor>#0000FF</image:strokeColor><image:fillColor>#00FF00</image:fillColor><image:upperLeft><image:x>20</image:x><image:y>20</image:y></image:upperLeft><image:lowerRight><image:x>50</image:x><image:y>50</image:y></image:lowerRight><image:cornerWidth>10</image:cornerWidth><image:cornerHeight>10</image:cornerHeight></image:roundedRectangle>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/rectangleRoundedBlueGreen.gif"))
- return basic:equals($draw, $draw-ref)
-};
-
-
-(:~
- : @return true if the man:draw-rounded-rectangle function works.
- :)
-declare %an:nondeterministic function local:test-draw-rounded-rectangle-anti-aliased() as xs:boolean {
- let $draw := paint:paint($local:gif, <image:roundedRectangle><image:strokeColor>#0000FF</image:strokeColor><image:fillColor>#00FF00</image:fillColor><image:antiAliasing>true</image:antiAliasing><image:upperLeft><image:x>20</image:x><image:y>20</image:y></image:upperLeft><image:lowerRight><image:x>50</image:x><image:y>50</image:y></image:lowerRight><image:cornerWidth>10</image:cornerWidth><image:cornerHeight>10</image:cornerHeight></image:roundedRectangle>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/rectangleRoundedAntiAliased.gif"))
- return basic:equals($draw, $draw-ref)
-};
-
-
-declare %an:nondeterministic %an:sequential function local:main() as xs:string* {
-
- let $a := local:test-draw-rectangle()
- return
- if (fn:not($a)) then
- exit returning local:error(("Drawing a rectangle on an image failed."));
- else ();
-
- let $c := local:test-draw-rectangle-green()
- return
- if (fn:not($c)) then
- exit returning local:error(("Drawing a green rectangle on an image failed."));
- else ();
-
-
- let $e := local:test-draw-rectangle-anti-aliased()
- return
- if (fn:not($e)) then
- exit returning local:error(("Drawing a anti-aliased wide green rectangle filled with red on an image failed."));
- else ();
-
-
- let $f := local:test-draw-rounded-rectangle()
- return
- if (fn:not($f)) then
- exit returning local:error(("Drawing a rounded rectangle on an image failed."));
- else ();
-
-
- let $g := local:test-draw-rounded-rectangle-blue()
- return
- if (fn:not($g)) then
- exit returning local:error(("Drawing a blue rounded rectangle on an image failed."));
- else ();
-
- let $h := local:test-draw-rounded-rectangle-blue-green()
- return
- if (fn:not($h)) then
- exit returning local:error(("Drawing a blue rounded rectangle filled with green on an image failed."));
- else ();
-
-
- let $j := local:test-draw-rounded-rectangle-anti-aliased()
- return
- if (fn:not($j)) then
- exit returning local:error(("Drawing a blue rounded rectangle anti-aliased filled with green on an image failed."));
- else ();
-
- (: If all went well ... make sure the world knows! :)
- "SUCCESS"
-};
-
-local:main()
-
=== removed file 'test/Queries/image/paint_5.xq'
--- test/Queries/image/paint_5.xq 2012-04-11 09:50:23 +0000
+++ test/Queries/image/paint_5.xq 1970-01-01 00:00:00 +0000
@@ -1,160 +0,0 @@
-(:~
- : Simple test module for the paint functions of the image library.
- :
- : @author Daniel Thomas
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace paint = 'http://www.zorba-xquery.com/modules/image/paint';
-import schema namespace image = 'http://www.zorba-xquery.com/modules/image/image';
-
-declare namespace an = "http://www.zorba-xquery.com/annotations";
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-
-
-declare variable $local:jpg as xs:base64Binary := basic:create(xs:unsignedInt(100), xs:unsignedInt(100), image:imageFormat("JPEG"));
-
-
-(:~
- : Outputs a nice error message to the screen ...
- :
- : @param $messsage is the message to be displayed
- : @return The passed message but really very, very nicely formatted.
- :)
-declare function local:error($messages as xs:string*) as xs:string* {
- "
-************************************************************************
-ERROR:
- Location:", file:path-to-native("."), "
- Cause:",
- $messages,
- "
-************************************************************************
-"
-};
-
-
-
-(:~
- : @return true if the man:draw-circle function works.
- :)
-declare %an:nondeterministic function local:test-draw-circle() as xs:boolean {
- let $draw := paint:paint($local:jpg, <image:circle><image:origin><image:x>20</image:x><image:y>20</image:y></image:origin><image:perimeter>5</image:perimeter></image:circle>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/circle.jpg"))
- return basic:equals($draw, $draw-ref)
-};
-
-
-(:~
- : @return true if the man:draw-ellipse function works.
- :)
-declare %an:nondeterministic function local:test-draw-ellipse() as xs:boolean {
- let $draw := paint:paint($local:jpg, <image:ellipse><image:origin><image:x>50</image:x><image:y>50</image:y></image:origin><image:perimeterX>30</image:perimeterX><image:perimeterY>20</image:perimeterY></image:ellipse>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/ellipse.jpg"))
- return basic:equals($draw, $draw-ref)
-};
-
-(:~
- : @return true if the man:draw-arc function works.
- :)
-declare %an:nondeterministic function local:test-draw-arc() as xs:boolean {
- let $draw := paint:paint($local:jpg, <image:arc><image:origin><image:x>50</image:x><image:y>50</image:y></image:origin><image:perimeterX>10</image:perimeterX><image:perimeterY>20</image:perimeterY><image:startDegrees>180</image:startDegrees><image:endDegrees>270</image:endDegrees></image:arc>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/arc.jpg"))
- return basic:equals($draw, $draw-ref)
-};
-
-(:~
- : @return true if the man:draw-arc function works.
- :)
-declare %an:nondeterministic function local:test-draw-red-arc() as xs:boolean {
- let $draw := paint:paint($local:jpg, <image:arc><image:strokeColor>#FF0000</image:strokeColor><image:origin><image:x>50</image:x><image:y>50</image:y></image:origin><image:perimeterX>10</image:perimeterX><image:perimeterY>20</image:perimeterY><image:startDegrees>180</image:startDegrees><image:endDegrees>270</image:endDegrees></image:arc>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/arcRed.jpg"))
- return basic:equals($draw, $draw-ref)
-};
-
-(:~
- : @return true if the man:draw-arc function works.
- :)
-declare %an:nondeterministic function local:test-draw-red-green-arc() as xs:boolean {
- let $draw := paint:paint($local:jpg, <image:arc><image:strokeColor>#FF0000</image:strokeColor><image:fillColor>#00AF00</image:fillColor><image:origin><image:x>50</image:x><image:y>50</image:y></image:origin><image:perimeterX>10</image:perimeterX><image:perimeterY>20</image:perimeterY><image:startDegrees>180</image:startDegrees><image:endDegrees>270</image:endDegrees></image:arc>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/arcRedGreen.jpg"))
- return basic:equals($draw, $draw-ref)
-};
-
-(:~
- : @return true if the man:draw-arc function works.
- :)
-declare %an:nondeterministic function local:test-draw-wide-arc() as xs:boolean {
- let $draw := paint:paint($local:jpg, <image:arc><image:strokeWidth>5</image:strokeWidth><image:strokeColor>#FF0000</image:strokeColor><image:fillColor>#00AF00</image:fillColor><image:origin><image:x>50</image:x><image:y>50</image:y></image:origin><image:perimeterX>10</image:perimeterX><image:perimeterY>20</image:perimeterY><image:startDegrees>180</image:startDegrees><image:endDegrees>270</image:endDegrees></image:arc>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/arcWide.jpg"))
- return basic:equals($draw, $draw-ref)
-};
-
-
-
-(:~
- : @return true if the man:draw-arc function works.
- :)
-declare %an:nondeterministic function local:test-draw-anti-aliased-arc() as xs:boolean {
- let $draw := paint:paint($local:jpg, <image:arc><image:strokeWidth>5</image:strokeWidth><image:strokeColor>#FF0000</image:strokeColor><image:fillColor>#00AF00</image:fillColor><image:antiAliasing>true</image:antiAliasing><image:origin><image:x>50</image:x><image:y>50</image:y></image:origin><image:perimeterX>10</image:perimeterX><image:perimeterY>20</image:perimeterY><image:startDegrees>180</image:startDegrees><image:endDegrees>270</image:endDegrees></image:arc>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/arcAntiAliased.jpg"))
- return basic:equals($draw, $draw-ref)
-};
-
-
-
-
-
-declare %an:nondeterministic %an:sequential function local:main() as xs:string* {
-
- let $a := local:test-draw-circle()
- return
- if (fn:not($a)) then
- exit returning local:error(("Drawing a circle on an image failed."));
- else ();
-
- let $b := local:test-draw-ellipse()
- return
- if (fn:not($b)) then
- exit returning local:error(("Drawing an ellipse on an image failed."));
- else ();
-
-
- let $c := local:test-draw-arc()
- return
- if (fn:not($c)) then
- exit returning local:error(("Drawing an arc on an image failed."));
- else ();
-
- let $d := local:test-draw-red-arc()
- return
- if (fn:not($d)) then
- exit returning local:error(("Drawing a red arc on an image failed."));
- else ();
-
- let $e := local:test-draw-red-green-arc()
- return
- if (fn:not($e)) then
- exit returning local:error(("Drawing a red arc with green background on an image failed."));
- else ();
-
- let $f := local:test-draw-wide-arc()
- return
- if (fn:not($f)) then
- exit returning local:error(("Drawing an arc with wide strokes on an image failed."));
- else ();
-
- let $g := local:test-draw-anti-aliased-arc()
- return
- if (fn:not($g)) then
- exit returning local:error(("Drawing an anti-aliased arc with wide strokes on an image failed."));
- else ();
-
- (: If all went well ... make sure the world knows! :)
- "SUCCESS"
-
-};
-
-local:main()
-
=== removed file 'test/Queries/image/paint_6.xq'
--- test/Queries/image/paint_6.xq 2012-04-11 09:50:23 +0000
+++ test/Queries/image/paint_6.xq 1970-01-01 00:00:00 +0000
@@ -1,123 +0,0 @@
-(:~
- : Simple test module for the paint functions of the image library.
- :
- : @author Daniel Thomas
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace file = 'http://expath.org/ns/file';
-import module namespace paint = 'http://www.zorba-xquery.com/modules/image/paint';
-import schema namespace image = 'http://www.zorba-xquery.com/modules/image/image';
-
-declare namespace an = "http://www.zorba-xquery.com/annotations";
-
-declare variable $local:image-dir := fn:concat(file:dir-name(fn:static-base-uri()), "/images/");
-declare variable $local:jpg as xs:base64Binary := basic:create(xs:unsignedInt(100), xs:unsignedInt(100), image:imageFormat("JPEG"));
-
-
-(:~
- : Outputs a nice error message to the screen ...
- :
- : @param $messsage is the message to be displayed
- : @return The passed message but really very, very nicely formatted.
- :)
-declare function local:error($messages as xs:string*) as xs:string* {
- "
-************************************************************************
-ERROR:
- Location:", file:path-to-native("."), "
- Cause:",
- $messages,
- "
-************************************************************************
-"
-};
-
-
-(:~
- : @return true if the man:draw-polygon function works.
- :)
-declare %an:nondeterministic function local:test-draw-polygon() as xs:boolean {
- let $draw := paint:paint($local:jpg, <image:polygon><image:point><image:x>10</image:x><image:y>10</image:y></image:point><image:point><image:x>40</image:x><image:y>80</image:y></image:point><image:point><image:x>50</image:x><image:y>30</image:y></image:point></image:polygon>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/polygon.jpg"))
- return basic:equals($draw, $draw-ref)
-};
-
-(:~
- : @return true if the man:draw-polygon function works.
- :)
-declare %an:nondeterministic function local:test-draw-polygon-red() as xs:boolean {
- let $draw := paint:paint($local:jpg, <image:polygon><image:strokeColor>#FF0000</image:strokeColor><image:point><image:x>10</image:x><image:y>10</image:y></image:point><image:point><image:x>40</image:x><image:y>80</image:y></image:point><image:point><image:x>50</image:x><image:y>30</image:y></image:point></image:polygon>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/polygonRed.jpg"))
- return basic:equals($draw, $draw-ref)
-};
-
-(:~
- : @return true if the man:draw-polygon function works.
- :)
-declare %an:nondeterministic function local:test-draw-polygon-red-green() as xs:boolean {
- let $draw := paint:paint($local:jpg, <image:polygon><image:strokeColor>#FF0000</image:strokeColor><image:fillColor>#00FF00</image:fillColor><image:point><image:x>10</image:x><image:y>10</image:y></image:point><image:point><image:x>40</image:x><image:y>80</image:y></image:point><image:point><image:x>50</image:x><image:y>30</image:y></image:point></image:polygon>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/polygonRedGreen.jpg"))
- return basic:equals($draw, $draw-ref)
-};
-
-(:~
- : @return true if the man:draw-polygon function works.
- :)
-declare %an:nondeterministic function local:test-draw-polygon-wide() as xs:boolean {
- let $draw := paint:paint($local:jpg, <image:polygon><image:strokeWidth>3</image:strokeWidth><image:strokeColor>#FF0000</image:strokeColor><image:fillColor>#00FF00</image:fillColor><image:point><image:x>10</image:x><image:y>10</image:y></image:point><image:point><image:x>40</image:x><image:y>80</image:y></image:point><image:point><image:x>50</image:x><image:y>30</image:y></image:point></image:polygon>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/polygonWide.jpg"))
- return basic:equals($draw, $draw-ref)
-};
-
-
-(:~
- : @return true if the man:draw-polygon function works.
- :)
-declare %an:nondeterministic function local:test-draw-polygon-anti-aliased() as xs:boolean {
- let $draw := paint:paint($local:jpg, <image:polygon><image:strokeWidth>3</image:strokeWidth><image:strokeColor>#FF0000</image:strokeColor><image:fillColor>#00FF00</image:fillColor><image:antiAliasing>true</image:antiAliasing><image:point><image:x>10</image:x><image:y>10</image:y></image:point><image:point><image:x>40</image:x><image:y>80</image:y></image:point><image:point><image:x>50</image:x><image:y>30</image:y></image:point></image:polygon>)
- let $draw-ref := file:read-binary(concat($local:image-dir, "paint/polygonAntiAliased.jpg"))
- return basic:equals($draw, $draw-ref)
-};
-
-
-declare %an:nondeterministic %an:sequential function local:main() as xs:string* {
-
- let $a := local:test-draw-polygon()
- return
- if (fn:not($a)) then
- exit returning local:error(("Drawing a polygon on an image failed."));
- else ();
-
-
- let $b := local:test-draw-polygon-red()
- return
- if (fn:not($b)) then
- exit returning local:error(("Drawing a red polygon on an image failed."));
- else ();
-
-
- let $c := local:test-draw-polygon-red-green()
- return
- if (fn:not($c)) then
- exit returning local:error(("Drawing a red polygon filled with green color on an image failed."));
- else ();
-
-
- let $d := local:test-draw-polygon-wide()
- return
- if (fn:not($d)) then
- exit returning local:error(("Drawing a polygon with wide strokes on an image failed."));
- else ();
-
- let $e := local:test-draw-polygon-anti-aliased()
- return
- if (fn:not($e)) then
- exit returning local:error(("Drawing an anti-aliased polygon on an image failed."));
- else ();
-
-
- (: If all went well ... make sure the world knows! :)
- "SUCCESS"
-};
-
-local:main()
=== removed file 'test/Queries/image/paint_circles.xq'
--- test/Queries/image/paint_circles.xq 2011-08-07 00:38:36 +0000
+++ test/Queries/image/paint_circles.xq 1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
-(:~
- : This example creates a new image using the image/basic function and paints different sorts of circles and arcs onto it.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty, in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $image-with-circles, <method>binary</method>), send it in an email etc.
- :
- : Actually, as the paint function accepts sequences of shapes, it would have been possible to paint all circles, ellipses and arcs with one single command
- : paint:paint($new-image, (<image:circle><image:origin><image:x>20</image:x><image:y>20</image:y></image:origin><image:perimeter>20</image:perimeter></image:circle>,
- : <image:ellipse><image:origin><image:x>40</image:x><image:y>70</image:y></image:origin><image:perimeterX>20</image:perimeterX><image:perimeterY>10</image:perimeterY></image:ellipse>,
- : <image:arc><image:origin><image:x>70</image:x><image:y>35</image:y></image:origin><image:perimeterX>15</image:perimeterX><image:perimeterY>25</image:perimeterY><image:startDegrees>90</image:startDegrees><image:endDegrees>180</image:endDegrees></image:arc>,
- : <image:circle><image:fillColor>#0000FF</image:fillColor><image:origin><image:x>80</image:x><image:y>20</image:y></image:origin><image:perimeter>20</image:perimeter></image:circle>))
- :
- : However, here it is done with several function calls to make it more clear what exactly is painted.
- :
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace paint = 'http://www.zorba-xquery.com/modules/image/paint';
-import module namespace file = 'http://expath.org/ns/file';
-
-import schema namespace image = 'http://www.zorba-xquery.com/modules/image/image';
-
-let $new-image := basic:create(xs:unsignedInt(100), xs:unsignedInt(100), "GIF")
-
-(: paint a simple circle with origin in (20, 20) and a perimeter of 20px to the image :)
-let $image-with-circle := paint:paint($new-image, <image:circle><image:origin><image:x>20</image:x><image:y>20</image:y></image:origin><image:perimeter>20</image:perimeter></image:circle>)
-
-(: paint an ellipse to the image :)
-let $image-with-circles := paint:paint($image-with-circle, <image:ellipse><image:origin><image:x>40</image:x><image:y>70</image:y></image:origin><image:perimeterX>20</image:perimeterX><image:perimeterY>10</image:perimeterY></image:ellipse>)
-
-(: paint an arc from 90 to 180 degrees to the image :)
-let $image-with-circles := paint:paint($image-with-circles, <image:arc><image:origin><image:x>70</image:x><image:y>35</image:y></image:origin><image:perimeterX>15</image:perimeterX><image:perimeterY>25</image:perimeterY><image:startDegrees>90</image:startDegrees><image:endDegrees>180</image:endDegrees></image:arc>)
-
-(: paint a blue circle with black contour onto the image :)
-let $image-with-circles := paint:paint($image-with-circles, <image:circle><image:fillColor>#0000FF</image:fillColor><image:origin><image:x>80</image:x><image:y>20</image:y></image:origin><image:perimeter>20</image:perimeter></image:circle>)
-
-
-return not(empty($image-with-circles))
-
=== removed file 'test/Queries/image/paint_different_lines.xq'
--- test/Queries/image/paint_different_lines.xq 2011-08-07 00:38:36 +0000
+++ test/Queries/image/paint_different_lines.xq 1970-01-01 00:00:00 +0000
@@ -1,29 +0,0 @@
-(:~
- : This example creates a new image using the image/basic function and paints a few different colored lines to it.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty, in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $image-with-4-line, <method>binary</method>), send it in an email etc.
- :
- : Actually, as the paint function takes a sequence of shapes all lines could have been painted with one single function call with
- : paint:paint($new-image, (<image:line><image:start><image:x>10</image:x><image:y>0</image:y></image:start><image:end><image:x>10</image:x><image:y>100</image:y></image:end></image:line>,
- <image:line><image:strokeColor>#FF0000</image:strokeColor><image:start><image:x>30</image:x><image:y>0</image:y></image:start><image:end><image:x>30</image:x><image:y>100</image:y></image:end></image:line>,
- <image:line><image:strokeColor>#FF0000</image:strokeColor><image:antiAliasing>true</image:antiAliasing><image:start><image:x>50</image:x><image:y>0</image:y></image:start><image:end><image:x>50</image:x><image:y>100</image:y></image:end></image:line>, <image:line><image:strokeWidth>10</image:strokeWidth><image:strokeColor>#FF0000</image:strokeColor><image:antiAliasing>true</image:antiAliasing><image:start><image:x>70</image:x><image:y>0</image:y></image:start><image:end><image:x>70</image:x><image:y>100</image:y></image:end></image:line>)
- :
- : However, to show exactly what is painted it was done with several function calls in this example (which is much less performant).
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace paint = 'http://www.zorba-xquery.com/modules/image/paint';
-
-import schema namespace image = 'http://www.zorba-xquery.com/modules/image/image';
-
-let $new-image := basic:create(xs:unsignedInt(100), xs:unsignedInt(100), "GIF")
-(: paint a simple line from (10, 0) to (10, 100) :)
-let $image-with-1-line := paint:paint($new-image, <image:line><image:start><image:x>10</image:x><image:y>0</image:y></image:start><image:end><image:x>10</image:x><image:y>100</image:y></image:end></image:line>)
-(: paint a simple red line from (30, 0) to (30, 100) :)
-let $image-with-2-line := paint:paint($image-with-1-line, <image:line><image:strokeColor>#FF0000</image:strokeColor><image:start><image:x>30</image:x><image:y>0</image:y></image:start><image:end><image:x>30</image:x><image:y>100</image:y></image:end></image:line>)
-(: paint a simple red anti-aliased line from (50, 0) to (50, 100) :)
-let $image-with-3-line := paint:paint($image-with-2-line, <image:line><image:strokeColor>#FF0000</image:strokeColor><image:antiAliasing>true</image:antiAliasing><image:start><image:x>50</image:x><image:y>0</image:y></image:start><image:end><image:x>50</image:x><image:y>100</image:y></image:end></image:line>)
-(: paint a simple red wide anti-aliased line from (70, 0) to (70, 100) :)
-let $image-with-4-line := paint:paint($image-with-3-line, <image:line><image:strokeWidth>10</image:strokeWidth><image:strokeColor>#FF0000</image:strokeColor><image:antiAliasing>true</image:antiAliasing><image:start><image:x>70</image:x><image:y>0</image:y></image:start><image:end><image:x>70</image:x><image:y>100</image:y></image:end></image:line>)
-
-return not(empty($image-with-4-line))
-
=== removed file 'test/Queries/image/paint_polygon.xq'
--- test/Queries/image/paint_polygon.xq 2011-08-07 00:38:36 +0000
+++ test/Queries/image/paint_polygon.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example creates a new image using the image/basic function and paints a polygon to it.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty, in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $image-with-polygon, <method>binary</method>), send it in an email etc.
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace paint = 'http://www.zorba-xquery.com/modules/image/paint';
-
-import schema namespace image = 'http://www.zorba-xquery.com/modules/image/image';
-
-let $new-image := basic:create(xs:unsignedInt(100), xs:unsignedInt(100), "GIF")
-
-(: paint an anti-aliased polyline which goes through the points (0,0) (30, 70), (20, 18), (89, 33) :)
-let $image-with-polygon := paint:paint($new-image, <image:polygon><image:antiAliasing>true</image:antiAliasing><image:point><image:x>0</image:x><image:y>0</image:y></image:point><image:point><image:x>30</image:x><image:y>70</image:y></image:point><image:point><image:x>20</image:x><image:y>18</image:y></image:point><image:point><image:x>89</image:x><image:y>33</image:y></image:point></image:polygon>)
-
-return not(empty($image-with-polygon))
-
=== removed file 'test/Queries/image/paint_polyline.xq'
--- test/Queries/image/paint_polyline.xq 2011-08-07 00:38:36 +0000
+++ test/Queries/image/paint_polyline.xq 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-(:~
- : This example creates a new image using the image/basic function and paints a polyline to it.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty, in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $image-with-polyline, <method>binary</method>), send it in an email etc.
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace paint = 'http://www.zorba-xquery.com/modules/image/paint';
-
-import schema namespace image = 'http://www.zorba-xquery.com/modules/image/image';
-
-let $new-image := basic:create(xs:unsignedInt(100), xs:unsignedInt(100), "GIF")
-
-(: paint an anti-aliased polyline which goes through the points (0,0) (30, 70), (20, 18), (89, 33) :)
-let $image-with-polyline := paint:paint($new-image, <image:polyLine><image:antiAliasing>true</image:antiAliasing><image:point><image:x>0</image:x><image:y>0</image:y></image:point><image:point><image:x>30</image:x><image:y>70</image:y></image:point><image:point><image:x>20</image:x><image:y>18</image:y></image:point><image:point><image:x>89</image:x><image:y>33</image:y></image:point></image:polyLine>)
-
-return not(empty($image-with-polyline))
-
=== removed file 'test/Queries/image/paint_rectangles.xq'
--- test/Queries/image/paint_rectangles.xq 2011-08-07 00:38:36 +0000
+++ test/Queries/image/paint_rectangles.xq 1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
-(:~
- : This example creates a new image using the image/basic function and paints different sorts of rectangles onto it.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty, in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $image-with-rectangles, <method>binary</method>), send it in an email etc.
- :
- : Actually, all rectangles could have been painted with one single function call, as the paint function also takes sequences of shapes with
- : paint:paint($new-image, (<image:rectangle><image:upperLeft><image:x>10</image:x><image:y>10</image:y></image:upperLeft><image:lowerRight><image:x>20</image:x><image:y>20</image:y></image:lowerRight></image:rectangle>,
- : <image:roundedRectangle><image:upperLeft><image:x>30</image:x><image:y>30</image:y></image:upperLeft><image:lowerRight><image:x>50</image:x><image:y>60</image:y></image:lowerRight><corne
- rWidth>10</image:cornerWidth><image:cornerHeight>10</image:cornerHeight></image:roundedRectangle>,
- : <image:rectangle><image:strokeColor>#00FF00</image:strokeColor><image:fillColor>#FF0000</image:fillColor><image:upperLeft><image:x>75</image:x><image:y>10</image:y></u
- pperLeft><image:lowerRight><image:x>95</image:x><image:y>50</image:y></image:lowerRight></image:rectangle>))
- :
- : However, to make clear what exaclty is painted it was done with several function calls in this example (which is less performant).
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace paint = 'http://www.zorba-xquery.com/modules/image/paint';
-
-import schema namespace image = 'http://www.zorba-xquery.com/modules/image/image';
-
-let $new-image := basic:create(xs:unsignedInt(100), xs:unsignedInt(100), "GIF")
-
-(: paint a simple rectangle to the image :)
-let $image-with-rectangle := paint:paint($new-image, <image:rectangle><image:upperLeft><image:x>10</image:x><image:y>10</image:y></image:upperLeft><image:lowerRight><image:x>20</image:x><image:y>20</image:y></image:lowerRight></image:rectangle>)
-
-(: paint a rounded rectangle to the image with a corner width of 10px and a corner height of 10 px :)
-let $image-with-rectangles := paint:paint($image-with-rectangle, <image:roundedRectangle><image:upperLeft><image:x>30</image:x><image:y>30</image:y></image:upperLeft><image:lowerRight><image:x>50</image:x><image:y>60</image:y></image:lowerRight><image:cornerWidth>10</image:cornerWidth><image:cornerHeight>10</image:cornerHeight></image:roundedRectangle>)
-
-(: paint a rectangle with green contour which is filled with red to the image :)
-let $image-with-rectangles := paint:paint($image-with-rectangles, <image:rectangle><image:strokeColor>#00FF00</image:strokeColor><image:fillColor>#FF0000</image:fillColor><image:upperLeft><image:x>75</image:x><image:y>10</image:y></image:upperLeft><image:lowerRight><image:x>95</image:x><image:y>50</image:y></image:lowerRight></image:rectangle>)
-
-return not(empty($image-with-rectangles))
=== removed file 'test/Queries/image/paint_stroked_polyline.xq'
--- test/Queries/image/paint_stroked_polyline.xq 2011-08-07 00:38:36 +0000
+++ test/Queries/image/paint_stroked_polyline.xq 1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
-(:~
- : This example creates a new image using the image/basic function and paints a stroked polyline to it.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty, in a real application one could further process the image, or write it
- : to disk using file:write(a_path, $image-with-polyline, <method>binary</method>), send it in an email etc.
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic';
-import module namespace paint = 'http://www.zorba-xquery.com/modules/image/paint';
-
-import schema namespace image = 'http://www.zorba-xquery.com/modules/image/image';
-
-let $new-image := basic:create(xs:unsignedInt(100), xs:unsignedInt(100), "GIF")
-(: paint an anti-aliased polyline with stoke length 2 and gap length 1 which goes through the points (0,0) (30, 70), (20, 18), (89, 33) :)
-let $image-with-polyline := paint:paint($new-image, <image:strokedPolyLine><image:antiAliasing>true</image:antiAliasing><image:point><image:x>0</image:x><image:y>0</image:y></image:point><image:point><image:x>30</image:x><image:y>70</image:y></image:point><image:point><image:x>20</image:x><image:y>18</image:y></image:point><image:point><image:x>89</image:x><image:y>33</image:y></image:point><image:strokeLength>2</image:strokeLength><image:gapLength>5</image:gapLength></image:strokedPolyLine>)
-
-return not(empty($image-with-polyline))
-
=== removed file 'test/Queries/image/paint_text.xq'
--- test/Queries/image/paint_text.xq 2011-08-07 00:38:36 +0000
+++ test/Queries/image/paint_text.xq 1970-01-01 00:00:00 +0000
@@ -1,15 +0,0 @@
-(:~
- : This example creates a new image using the image/basic function and paints a text to it.
- : As it is, the example just asserts that the resulting xs:base64Binary is not empty, in a real application one could further process the image, or write it
- : to disk using file:write-binary(a_path, $image-with-text), send it in an email etc.
- :)
-import module namespace basic = 'http://www.zorba-xquery.com/modules/image/basic'; import module namespace paint = 'http://www.zorba-xquery.com/modules/image/paint';
-import schema namespace image = 'http://www.zorba-xquery.com/modules/image/image';
-
-let $new-image := basic:create(xs:unsignedInt(200), xs:unsignedInt(100), "GIF")
-
-(: write a really important message to the image :)
-
-let $image-with-text := paint:paint($new-image, <image:text><image:origin><image:x>10</image:x><image:y>40</image:y></image:origin><image:text>Zorba really rocks!</image:text><image:font>Arial</image:font><image:font-size>12</image:font-size></image:text>)
-
-return not(empty($image-with-text))
Follow ups