ex-thumbnailator/readme.md

25 lines
777 B
Markdown
Raw Normal View History

2016-04-16 22:21:17 +01:00
# expkg-zone58.image.thumbnailator
2013-06-11 22:03:12 +01:00
An XQuery interface to the thumbnail generator library
2016-04-16 22:21:17 +01:00
[thumbnailator](https://github.com/coobird/thumbnailator)
2013-06-10 22:35:14 +01:00
2016-04-16 22:21:17 +01:00
Tested against BaseX 8.4.3.
2013-06-10 22:35:14 +01:00
# Installation
The library is packaged in the [EXpath](http://expath.org/spec/pkg) xar format with
the thumbnailator jar included. It can be installed into the BaseX repository by
executing the command:
````
2016-04-16 22:21:17 +01:00
repo:install('https://github.com/expkg-zone58/ex-thumbnailator/dist/thumbnailator.zar')
2013-06-10 22:35:14 +01:00
````
# Usage
````
2016-04-16 22:21:17 +01:00
import module namespace t="expkg-zone58.image.thumbnailator";
t:create-thumbnail("/tmp/pic.jpg","/tmp/small.jpg",120,120)
2013-06-10 22:35:14 +01:00
````
# Tests
2016-04-16 22:21:17 +01:00
`test.xqm` script uses the BaseX [Unit module](http://docs.basex.org/wiki/Unit_Module)
# todo
2013-06-11 22:03:12 +01:00
explore java binding limits and fluent interface