[MOD] update to support BaseX 9.4.5 and use thumbnailator 4.13
This commit is contained in:
parent
460987bfec
commit
78e8f1b28a
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/java"/>
|
||||
<classpathentry kind="lib" path="src/main/content/thumbnailator-0.4.8.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="lib/BaseX924.jar"/>
|
||||
<classpathentry kind="lib" path="lib/BaseX945.jar"/>
|
||||
<classpathentry kind="lib" path="src/main/content/thumbnailator-0.4.13.jar"/>
|
||||
<classpathentry kind="output" path="build/classes"/>
|
||||
</classpath>
|
||||
|
386
dist/doc/thumbnailator.xqm.xml
vendored
386
dist/doc/thumbnailator.xqm.xml
vendored
@ -1,194 +1,194 @@
|
||||
<xqdoc:xqdoc xmlns:xqdoc="http://www.xqdoc.org/1.0">
|
||||
<xqdoc:control>
|
||||
<xqdoc:date>2018-06-29T19:13:26.072+01:00</xqdoc:date>
|
||||
<xqdoc:version>1.1</xqdoc:version>
|
||||
</xqdoc:control>
|
||||
<xqdoc:module type="library">
|
||||
<xqdoc:uri>expkg-zone58:image.thumbnailator</xqdoc:uri>
|
||||
<xqdoc:name>thumbnailator.xqm</xqdoc:name>
|
||||
<xqdoc:comment>
|
||||
<xqdoc:description>Generate image thumbnails using the thumbnailator library.</xqdoc:description>
|
||||
<xqdoc:see>https://github.com/coobird/thumbnailator</xqdoc:see>
|
||||
<xqdoc:author>andy bunce</xqdoc:author>
|
||||
<xqdoc:version>0.5</xqdoc:version>
|
||||
</xqdoc:comment>
|
||||
</xqdoc:module>
|
||||
<xqdoc:namespaces>
|
||||
<xqdoc:namespace prefix="thumbnails" uri="expkg-zone58:image.thumbnailator"/>
|
||||
<xqdoc:namespace prefix="Thumbs" uri="org.expkgzone58.image.Thumbs"/>
|
||||
</xqdoc:namespaces>
|
||||
<xqdoc:imports>
|
||||
<xqdoc:import type="library">
|
||||
<xqdoc:uri>org.expkgzone58.image.Thumbs</xqdoc:uri>
|
||||
</xqdoc:import>
|
||||
</xqdoc:imports>
|
||||
<xqdoc:variables/>
|
||||
<xqdoc:functions>
|
||||
<xqdoc:function arity="2">
|
||||
<xqdoc:comment>
|
||||
<xqdoc:description>generate scaled version of source image with maximum dimension of size</xqdoc:description>
|
||||
<xqdoc:param>$source base64Binary (streamed?) e.g from `fetch:binary`</xqdoc:param>
|
||||
<xqdoc:return>base64Binary for thumbnail</xqdoc:return>
|
||||
</xqdoc:comment>
|
||||
<xqdoc:name>thumbnails:size</xqdoc:name>
|
||||
<xqdoc:signature>declare function thumbnails:size($source as xs:base64Binary, $size as xs:integer) as xs:base64Binary</xqdoc:signature>
|
||||
<xqdoc:parameters>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>source</xqdoc:name>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>size</xqdoc:name>
|
||||
<xqdoc:type>xs:integer</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
</xqdoc:parameters>
|
||||
<xqdoc:return>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:return>
|
||||
</xqdoc:function>
|
||||
<xqdoc:function arity="3">
|
||||
<xqdoc:comment>
|
||||
<xqdoc:description>generate scaled version of source image with maximum dimension of size</xqdoc:description>
|
||||
<xqdoc:param>$source base64Binary (streamed?) e.g from `fetch:binary`</xqdoc:param>
|
||||
<xqdoc:return>base64Binary for thumbnail</xqdoc:return>
|
||||
</xqdoc:comment>
|
||||
<xqdoc:name>thumbnails:size</xqdoc:name>
|
||||
<xqdoc:signature>declare function thumbnails:size($source as xs:base64Binary, $width as xs:integer, $height as xs:integer) as xs:base64Binary</xqdoc:signature>
|
||||
<xqdoc:parameters>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>source</xqdoc:name>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>width</xqdoc:name>
|
||||
<xqdoc:type>xs:integer</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>height</xqdoc:name>
|
||||
<xqdoc:type>xs:integer</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
</xqdoc:parameters>
|
||||
<xqdoc:return>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:return>
|
||||
</xqdoc:function>
|
||||
<xqdoc:function arity="2">
|
||||
<xqdoc:comment>
|
||||
<xqdoc:description>generate scaled version of source image at given factors 0-1</xqdoc:description>
|
||||
<xqdoc:param>$source base64Binary (streamed?) e.g from `fetch:binary`</xqdoc:param>
|
||||
<xqdoc:return>the thumbnail</xqdoc:return>
|
||||
</xqdoc:comment>
|
||||
<xqdoc:name>thumbnails:scale</xqdoc:name>
|
||||
<xqdoc:signature>declare function thumbnails:scale($source as xs:base64Binary, $scale as xs:double) as xs:base64Binary</xqdoc:signature>
|
||||
<xqdoc:parameters>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>source</xqdoc:name>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>scale</xqdoc:name>
|
||||
<xqdoc:type>xs:double</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
</xqdoc:parameters>
|
||||
<xqdoc:return>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:return>
|
||||
</xqdoc:function>
|
||||
<xqdoc:function arity="3">
|
||||
<xqdoc:comment>
|
||||
<xqdoc:description>generate scaled version of source image at given factors 0-1</xqdoc:description>
|
||||
<xqdoc:param>$source base64Binary (streamed?) e.g from `fetch:binary`</xqdoc:param>
|
||||
<xqdoc:return>the thumbnail</xqdoc:return>
|
||||
</xqdoc:comment>
|
||||
<xqdoc:name>thumbnails:scale</xqdoc:name>
|
||||
<xqdoc:signature>declare function thumbnails:scale($source as xs:base64Binary, $xscale as xs:double, $yscale as xs:double) as xs:base64Binary</xqdoc:signature>
|
||||
<xqdoc:parameters>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>source</xqdoc:name>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>xscale</xqdoc:name>
|
||||
<xqdoc:type>xs:double</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>yscale</xqdoc:name>
|
||||
<xqdoc:type>xs:double</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
</xqdoc:parameters>
|
||||
<xqdoc:return>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:return>
|
||||
</xqdoc:function>
|
||||
<xqdoc:function arity="2">
|
||||
<xqdoc:comment>
|
||||
<xqdoc:description>generate thumbnail using parameters specified via XML</xqdoc:description>
|
||||
<xqdoc:param>$source base64Binary (streamed?) e.g from `fetch:binary`</xqdoc:param>
|
||||
<xqdoc:param>$task XML parameters <task><size width="100" ..</xqdoc:param>
|
||||
<xqdoc:return>the thumbnail</xqdoc:return>
|
||||
</xqdoc:comment>
|
||||
<xqdoc:name>thumbnails:task</xqdoc:name>
|
||||
<xqdoc:signature>declare function thumbnails:task($source as xs:base64Binary, $task as element(thumbnail)) as xs:base64Binary</xqdoc:signature>
|
||||
<xqdoc:parameters>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>source</xqdoc:name>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>task</xqdoc:name>
|
||||
<xqdoc:type>element(thumbnail)</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
</xqdoc:parameters>
|
||||
<xqdoc:return>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:return>
|
||||
</xqdoc:function>
|
||||
<xqdoc:function arity="1">
|
||||
<xqdoc:comment>
|
||||
<xqdoc:description>validate task thumbnail XML against schema</xqdoc:description>
|
||||
<xqdoc:param>$src XML parameters <thumbnail><size width="100" ..</xqdoc:param>
|
||||
<xqdoc:return>empty-sequence or error</xqdoc:return>
|
||||
<xqdoc:error>BXVA0001: the validation fails.</xqdoc:error>
|
||||
<xqdoc:error>BXVA0002: the validation process cannot be started.</xqdoc:error>
|
||||
<xqdoc:error>BXVA0003: no XML Schema validator is available.</xqdoc:error>
|
||||
<xqdoc:error>BXVA0004: no validator is found for the specified version.</xqdoc:error>
|
||||
</xqdoc:comment>
|
||||
<xqdoc:name>thumbnails:validate</xqdoc:name>
|
||||
<xqdoc:signature>declare function thumbnails:validate($src as item()*) as empty-sequence()</xqdoc:signature>
|
||||
<xqdoc:parameters>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>src</xqdoc:name>
|
||||
<xqdoc:type occurrence="*">item()</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
</xqdoc:parameters>
|
||||
<xqdoc:return>
|
||||
<xqdoc:type>empty-sequence()</xqdoc:type>
|
||||
</xqdoc:return>
|
||||
</xqdoc:function>
|
||||
<xqdoc:function arity="1">
|
||||
<xqdoc:comment>
|
||||
<xqdoc:description>validate task thumbnail XML against schema</xqdoc:description>
|
||||
<xqdoc:param>$src XML parameters <thumbnail><size width="100" ..</xqdoc:param>
|
||||
<xqdoc:return>validation report</xqdoc:return>
|
||||
</xqdoc:comment>
|
||||
<xqdoc:name>thumbnails:validation-report</xqdoc:name>
|
||||
<xqdoc:signature>declare function thumbnails:validation-report($src as item()*) as element(report)</xqdoc:signature>
|
||||
<xqdoc:parameters>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>src</xqdoc:name>
|
||||
<xqdoc:type occurrence="*">item()</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
</xqdoc:parameters>
|
||||
<xqdoc:return>
|
||||
<xqdoc:type>element(report)</xqdoc:type>
|
||||
</xqdoc:return>
|
||||
</xqdoc:function>
|
||||
<xqdoc:function arity="0">
|
||||
<xqdoc:name>thumbnails:schema-uri</xqdoc:name>
|
||||
<xqdoc:signature>declare function thumbnails:schema-uri() as xs:anyURI</xqdoc:signature>
|
||||
<xqdoc:return>
|
||||
<xqdoc:type>xs:anyURI</xqdoc:type>
|
||||
</xqdoc:return>
|
||||
</xqdoc:function>
|
||||
</xqdoc:functions>
|
||||
<xqdoc:xqdoc xmlns:xqdoc="http://www.xqdoc.org/1.0">
|
||||
<xqdoc:control>
|
||||
<xqdoc:date>2021-02-16T23:01:20.669Z</xqdoc:date>
|
||||
<xqdoc:version>1.1</xqdoc:version>
|
||||
</xqdoc:control>
|
||||
<xqdoc:module type="library">
|
||||
<xqdoc:uri>expkg-zone58:image.thumbnailator</xqdoc:uri>
|
||||
<xqdoc:name>thumbnailator.xqm</xqdoc:name>
|
||||
<xqdoc:comment>
|
||||
<xqdoc:description>Generate image thumbnails using the thumbnailator library.</xqdoc:description>
|
||||
<xqdoc:see>https://github.com/coobird/thumbnailator</xqdoc:see>
|
||||
<xqdoc:author>andy bunce</xqdoc:author>
|
||||
<xqdoc:version>0.6</xqdoc:version>
|
||||
</xqdoc:comment>
|
||||
</xqdoc:module>
|
||||
<xqdoc:imports>
|
||||
<xqdoc:import type="library">
|
||||
<xqdoc:uri>org.expkgzone58.image.Thumbs</xqdoc:uri>
|
||||
</xqdoc:import>
|
||||
</xqdoc:imports>
|
||||
<xqdoc:namespaces>
|
||||
<xqdoc:namespace prefix="thumbnails" uri="expkg-zone58:image.thumbnailator"/>
|
||||
<xqdoc:namespace prefix="Thumbs" uri="org.expkgzone58.image.Thumbs"/>
|
||||
</xqdoc:namespaces>
|
||||
<xqdoc:variables/>
|
||||
<xqdoc:functions>
|
||||
<xqdoc:function arity="2">
|
||||
<xqdoc:comment>
|
||||
<xqdoc:description>generate scaled version of source image with maximum dimension of size</xqdoc:description>
|
||||
<xqdoc:param>$source base64Binary (streamed?) e.g from `fetch:binary`</xqdoc:param>
|
||||
<xqdoc:return>base64Binary for thumbnail</xqdoc:return>
|
||||
</xqdoc:comment>
|
||||
<xqdoc:name>thumbnails:size</xqdoc:name>
|
||||
<xqdoc:signature>declare function thumbnails:size($source as xs:base64Binary , $size as xs:integer) as xs:base64Binary</xqdoc:signature>
|
||||
<xqdoc:parameters>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>source</xqdoc:name>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>size</xqdoc:name>
|
||||
<xqdoc:type>xs:integer</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
</xqdoc:parameters>
|
||||
<xqdoc:return>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:return>
|
||||
</xqdoc:function>
|
||||
<xqdoc:function arity="3">
|
||||
<xqdoc:comment>
|
||||
<xqdoc:description>generate scaled version of source image with maximum dimension of size</xqdoc:description>
|
||||
<xqdoc:param>$source base64Binary (streamed?) e.g from `fetch:binary`</xqdoc:param>
|
||||
<xqdoc:return>base64Binary for thumbnail</xqdoc:return>
|
||||
</xqdoc:comment>
|
||||
<xqdoc:name>thumbnails:size</xqdoc:name>
|
||||
<xqdoc:signature>declare function thumbnails:size($source as xs:base64Binary , $width as xs:integer , $height as xs:integer) as xs:base64Binary</xqdoc:signature>
|
||||
<xqdoc:parameters>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>source</xqdoc:name>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>width</xqdoc:name>
|
||||
<xqdoc:type>xs:integer</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>height</xqdoc:name>
|
||||
<xqdoc:type>xs:integer</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
</xqdoc:parameters>
|
||||
<xqdoc:return>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:return>
|
||||
</xqdoc:function>
|
||||
<xqdoc:function arity="2">
|
||||
<xqdoc:comment>
|
||||
<xqdoc:description>generate scaled version of source image at given factors 0-1</xqdoc:description>
|
||||
<xqdoc:param>$source base64Binary (streamed?) e.g from `fetch:binary`</xqdoc:param>
|
||||
<xqdoc:return>the thumbnail</xqdoc:return>
|
||||
</xqdoc:comment>
|
||||
<xqdoc:name>thumbnails:scale</xqdoc:name>
|
||||
<xqdoc:signature>declare function thumbnails:scale($source as xs:base64Binary , $scale as xs:double) as xs:base64Binary</xqdoc:signature>
|
||||
<xqdoc:parameters>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>source</xqdoc:name>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>scale</xqdoc:name>
|
||||
<xqdoc:type>xs:double</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
</xqdoc:parameters>
|
||||
<xqdoc:return>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:return>
|
||||
</xqdoc:function>
|
||||
<xqdoc:function arity="3">
|
||||
<xqdoc:comment>
|
||||
<xqdoc:description>generate scaled version of source image at given factors 0-1</xqdoc:description>
|
||||
<xqdoc:param>$source base64Binary (streamed?) e.g from `fetch:binary`</xqdoc:param>
|
||||
<xqdoc:return>the thumbnail</xqdoc:return>
|
||||
</xqdoc:comment>
|
||||
<xqdoc:name>thumbnails:scale</xqdoc:name>
|
||||
<xqdoc:signature>declare function thumbnails:scale($source as xs:base64Binary , $xscale as xs:double , $yscale as xs:double) as xs:base64Binary</xqdoc:signature>
|
||||
<xqdoc:parameters>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>source</xqdoc:name>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>xscale</xqdoc:name>
|
||||
<xqdoc:type>xs:double</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>yscale</xqdoc:name>
|
||||
<xqdoc:type>xs:double</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
</xqdoc:parameters>
|
||||
<xqdoc:return>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:return>
|
||||
</xqdoc:function>
|
||||
<xqdoc:function arity="2">
|
||||
<xqdoc:comment>
|
||||
<xqdoc:description>generate thumbnail using parameters specified via XML</xqdoc:description>
|
||||
<xqdoc:param>$source base64Binary (streamed?) e.g from `fetch:binary`</xqdoc:param>
|
||||
<xqdoc:param>$task XML parameters <task><size width="100" ..</xqdoc:param>
|
||||
<xqdoc:return>the thumbnail</xqdoc:return>
|
||||
</xqdoc:comment>
|
||||
<xqdoc:name>thumbnails:task</xqdoc:name>
|
||||
<xqdoc:signature>declare function thumbnails:task($source as xs:base64Binary , $task as element(thumbnail)) as xs:base64Binary</xqdoc:signature>
|
||||
<xqdoc:parameters>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>source</xqdoc:name>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>task</xqdoc:name>
|
||||
<xqdoc:type>element(thumbnail)</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
</xqdoc:parameters>
|
||||
<xqdoc:return>
|
||||
<xqdoc:type>xs:base64Binary</xqdoc:type>
|
||||
</xqdoc:return>
|
||||
</xqdoc:function>
|
||||
<xqdoc:function arity="1">
|
||||
<xqdoc:comment>
|
||||
<xqdoc:description>validate task thumbnail XML against schema</xqdoc:description>
|
||||
<xqdoc:param>$src XML parameters <thumbnail><size width="100" ..</xqdoc:param>
|
||||
<xqdoc:return>empty-sequence or error</xqdoc:return>
|
||||
<xqdoc:error>BXVA0001: the validation fails.</xqdoc:error>
|
||||
<xqdoc:error>BXVA0002: the validation process cannot be started.</xqdoc:error>
|
||||
<xqdoc:error>BXVA0003: no XML Schema validator is available.</xqdoc:error>
|
||||
<xqdoc:error>BXVA0004: no validator is found for the specified version.</xqdoc:error>
|
||||
</xqdoc:comment>
|
||||
<xqdoc:name>thumbnails:validate</xqdoc:name>
|
||||
<xqdoc:signature>declare function thumbnails:validate($src as item()*) as empty-sequence()</xqdoc:signature>
|
||||
<xqdoc:parameters>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>src</xqdoc:name>
|
||||
<xqdoc:type occurrence="*">item()</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
</xqdoc:parameters>
|
||||
<xqdoc:return>
|
||||
<xqdoc:type>empty-sequence()</xqdoc:type>
|
||||
</xqdoc:return>
|
||||
</xqdoc:function>
|
||||
<xqdoc:function arity="1">
|
||||
<xqdoc:comment>
|
||||
<xqdoc:description>validate task thumbnail XML against schema</xqdoc:description>
|
||||
<xqdoc:param>$src XML parameters <thumbnail><size width="100" ..</xqdoc:param>
|
||||
<xqdoc:return>validation report</xqdoc:return>
|
||||
</xqdoc:comment>
|
||||
<xqdoc:name>thumbnails:validation-report</xqdoc:name>
|
||||
<xqdoc:signature>declare function thumbnails:validation-report($src as item()*) as element(report)</xqdoc:signature>
|
||||
<xqdoc:parameters>
|
||||
<xqdoc:parameter>
|
||||
<xqdoc:name>src</xqdoc:name>
|
||||
<xqdoc:type occurrence="*">item()</xqdoc:type>
|
||||
</xqdoc:parameter>
|
||||
</xqdoc:parameters>
|
||||
<xqdoc:return>
|
||||
<xqdoc:type>element(report)</xqdoc:type>
|
||||
</xqdoc:return>
|
||||
</xqdoc:function>
|
||||
<xqdoc:function arity="0">
|
||||
<xqdoc:name>thumbnails:schema-uri</xqdoc:name>
|
||||
<xqdoc:signature>declare function thumbnails:schema-uri() as xs:anyURI</xqdoc:signature>
|
||||
<xqdoc:return>
|
||||
<xqdoc:type>xs:anyURI</xqdoc:type>
|
||||
</xqdoc:return>
|
||||
</xqdoc:function>
|
||||
</xqdoc:functions>
|
||||
</xqdoc:xqdoc>
|
BIN
dist/thumbnailator-8.0.1.xar
vendored
Normal file
BIN
dist/thumbnailator-8.0.1.xar
vendored
Normal file
Binary file not shown.
BIN
lib/BaseX945.jar
Normal file
BIN
lib/BaseX945.jar
Normal file
Binary file not shown.
@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="WINDOWS-1252" standalone="no"?>
|
||||
<jardesc>
|
||||
<jar path="ex-thumbnailator/src/main/content/thumbhelper-7.0.0.jar"/>
|
||||
<options buildIfNeeded="true" compress="true" descriptionLocation="/ex-thumbnailator/makejar.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="true" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
|
||||
<storedRefactorings deprecationInfo="true" structuralOnly="false"/>
|
||||
<selectedProjects/>
|
||||
<manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
|
||||
<sealing sealJar="false">
|
||||
<packagesToSeal/>
|
||||
<packagesToUnSeal/>
|
||||
</sealing>
|
||||
</manifest>
|
||||
<selectedElements exportClassFiles="true" exportJavaFiles="true" exportOutputFolder="false">
|
||||
<javaElement handleIdentifier="=ex-thumbnailator/src\/java"/>
|
||||
</selectedElements>
|
||||
</jardesc>
|
||||
<?xml version="1.0" encoding="WINDOWS-1252" standalone="no"?>
|
||||
<jardesc>
|
||||
<jar path="ex-thumbnailator/src/main/content/thumbhelper-8.0.0.jar"/>
|
||||
<options buildIfNeeded="true" compress="true" descriptionLocation="/ex-thumbnailator/makejar.jardesc" exportErrors="true" exportWarnings="true" includeDirectoryEntries="false" overwrite="true" saveDescription="true" storeRefactorings="false" useSourceFolders="false"/>
|
||||
<storedRefactorings deprecationInfo="true" structuralOnly="false"/>
|
||||
<selectedProjects/>
|
||||
<manifest generateManifest="true" manifestLocation="" manifestVersion="1.0" reuseManifest="false" saveManifest="false" usesManifest="true">
|
||||
<sealing sealJar="false">
|
||||
<packagesToSeal/>
|
||||
<packagesToUnSeal/>
|
||||
</sealing>
|
||||
</manifest>
|
||||
<selectedElements exportClassFiles="true" exportJavaFiles="true" exportOutputFolder="false">
|
||||
<javaElement handleIdentifier="=ex-thumbnailator/src\/java"/>
|
||||
</selectedElements>
|
||||
</jardesc>
|
||||
|
137
package.xml
137
package.xml
@ -1,68 +1,71 @@
|
||||
<!-- @see http://cxan.org/faq#add-pkg -->
|
||||
<repo abbrev="ex-thumbnailator">
|
||||
<pkg abbrev="ex-thumbnailator" id="https://github.com/expkg-zone58/ex-thumbnailator">
|
||||
<name>https://github.com/expkg-zone58/ex-thumbnailator</name>
|
||||
<abstract>Create a thumbnail from a file path.</abstract>
|
||||
<author id="coobird">coobird</author>
|
||||
<maintainer id="abunce">Andy Bunce</maintainer>
|
||||
<home>https://github.com/coobird/thumbnailator</home>
|
||||
<category id="libs">Library</category>
|
||||
<tag>image</tag>
|
||||
<tag>resize</tag>
|
||||
<tag>graphic</tag>
|
||||
<version num="4.1.4">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="4.1.5">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.0">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.1">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.2">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.3">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.4">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.5">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.7">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.8">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.9">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.10">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.11">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="6.0.0">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="6.0.1">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="6.0.2">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="7.0.0">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="7.0.1">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
</pkg>
|
||||
<!-- @see http://cxan.org/faq#add-pkg -->
|
||||
<repo abbrev="ex-thumbnailator">
|
||||
<pkg abbrev="ex-thumbnailator" id="https://github.com/expkg-zone58/ex-thumbnailator">
|
||||
<name>https://github.com/expkg-zone58/ex-thumbnailator</name>
|
||||
<abstract>Create a thumbnail from a file path.</abstract>
|
||||
<author id="coobird">coobird</author>
|
||||
<maintainer id="abunce">Andy Bunce</maintainer>
|
||||
<home>https://github.com/coobird/thumbnailator</home>
|
||||
<category id="libs">Library</category>
|
||||
<tag>image</tag>
|
||||
<tag>resize</tag>
|
||||
<tag>graphic</tag>
|
||||
<version num="4.1.4">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="4.1.5">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.0">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.1">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.2">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.3">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.4">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.5">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.7">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.8">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.9">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.10">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="5.0.11">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="6.0.0">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="6.0.1">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="6.0.2">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="7.0.0">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="7.0.1">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
<version num="8.0.1">
|
||||
<!-- generated: {fn:current-dateTime()} -->
|
||||
</version>
|
||||
</pkg>
|
||||
</repo>
|
@ -1,13 +1,13 @@
|
||||
# expkg-zone58:image.thumbnailator
|
||||
|
||||
An XQuery interface to the image thumbnail generator library
|
||||
[thumbnailator](https://github.com/coobird/thumbnailator) for BaseX 9+.
|
||||
[thumbnailator](https://github.com/coobird/thumbnailator) for BaseX 9.4.5+.
|
||||
|
||||
Features size, scale, caption, rotate, flip, colorize, watermark. More details at [doc](doc/readme.md)
|
||||
|
||||
## Versions
|
||||
* For Basex 9+ use thumbnailator 7.0.0+
|
||||
|
||||
* thumbnailator 8 requires Basex 9.4.5+
|
||||
* uses thumbnailator 4.13
|
||||
## Usage
|
||||
|
||||
Images are input and output as `xs:base64Binary` items. Inputs typically come from `fetch:binary`
|
||||
|
@ -9,7 +9,6 @@ import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
@ -85,10 +84,8 @@ public class Thumbs extends QueryModule{
|
||||
// build parameters from XML
|
||||
ThumbnailParameter fromNode(final ANode node) throws QueryException, IOException {
|
||||
ThumbnailParameterBuilder builder = new ThumbnailParameterBuilder();
|
||||
|
||||
Iterator<ANode> itr = node.children().iterator();
|
||||
while (itr.hasNext()) {
|
||||
ANode element = itr.next();
|
||||
for(final ANode element : node.childIter()) {
|
||||
|
||||
if (element.kind() == Data.ELEM) {
|
||||
String name = Token.string(element.name());
|
||||
// FnTrace.trace(name.getBytes(), "element: ".getBytes(), queryContext);
|
||||
@ -169,9 +166,7 @@ public class Thumbs extends QueryModule{
|
||||
|
||||
List<ImageFilter> filters(final ANode filters) throws QueryException, IOException {
|
||||
Pipeline pipeline = new Pipeline();
|
||||
Iterator<ANode> itr = filters.children().iterator();
|
||||
while (itr.hasNext()) {
|
||||
ANode node = itr.next();
|
||||
for(final ANode node : filters.childIter()) {
|
||||
if (node.kind() == Data.ELEM) {
|
||||
switch (Token.string(node.name())) {
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<package xmlns="http://www.basex.org/modules/pkg">
|
||||
<jar>thumbhelper-7.0.0.jar</jar>
|
||||
<jar>thumbnailator-0.4.8.jar</jar>
|
||||
<jar>thumbhelper-8.0.0.jar</jar>
|
||||
<jar>thumbnailator-0.4.13.jar</jar>
|
||||
<class>org.expkgzone58.image.Thumbs</class>
|
||||
</package>
|
||||
|
Binary file not shown.
BIN
src/main/content/thumbhelper-8.0.0.jar
Normal file
BIN
src/main/content/thumbhelper-8.0.0.jar
Normal file
Binary file not shown.
BIN
src/main/content/thumbnailator-0.4.13.jar
Normal file
BIN
src/main/content/thumbnailator-0.4.13.jar
Normal file
Binary file not shown.
Binary file not shown.
@ -2,10 +2,11 @@ xquery version "3.1" encoding "UTF-8";
|
||||
(:~ Generate image thumbnails using the thumbnailator library.
|
||||
: @see https://github.com/coobird/thumbnailator
|
||||
: @author andy bunce
|
||||
: @version 0.5
|
||||
: @version 0.6
|
||||
:)
|
||||
module namespace thumbnails = 'expkg-zone58:image.thumbnailator';
|
||||
import module namespace Thumbs = "org.expkgzone58.image.Thumbs";
|
||||
|
||||
(:~
|
||||
: generate scaled version of source image with maximum dimension of size
|
||||
: @param $source base64Binary (streamed?) e.g from `fetch:binary`
|
||||
|
@ -1,5 +1,5 @@
|
||||
<package xmlns="http://expath.org/ns/pkg" name="https://github.com/expkg-zone58/ex-thumbnailator"
|
||||
abbrev="thumbnailator" version="7.0.1" spec="1.0">
|
||||
abbrev="thumbnailator" version="8.0.1" spec="1.0">
|
||||
|
||||
<title>An XQuery interface to thumbnailator the thumbnail generator library.</title>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user