]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
88f4d466185559e53eaec634718446d840c3faeb
[tmp/jakarta-migration.git] /
1 <?xml version="1.0"?>
2 <!--
3   This file is based on nuxeo-platform-imaging-core-9.10.jar/OSGI-INF/commandline-imagemagick-contrib.xml
4
5   Reference: https://explorer.nuxeo.com/nuxeo/site/distribution/Nuxeo%20Platform%20LTS%202017-9.10/viewContribution/org.nuxeo.ecm.platform.picture.commandline.imagemagick--command
6 -->
7 <component name="cspace.org.nuxeo.ecm.platform.picture.commandline.imagemagick">
8
9   <require>org.nuxeo.ecm.platform.commandline.executor.service.defaultContrib</require>
10
11   <extension target="org.nuxeo.ecm.platform.commandline.executor.service.CommandLineExecutorComponent" point="command">
12
13     <command name="identify" enabled="true">
14       <commandLine>${cspace.im.root}identify</commandLine>
15       <parameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -ping -format '%m %w %h %z %[colorspace]' #{inputFilePath}[0]</parameterString>
16       <winParameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -ping -format "%m %w %h %z %[colorspace]" #{inputFilePath}[0]</winParameterString>
17       <installationDirective>You need to install ImageMagick.</installationDirective>
18     </command>
19
20     <command name="crop" enabled="true">
21       <commandLine>${cspace.im.root}stream</commandLine>
22       <parameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -map rgb -storage-type char -extract #{tileWidth}x#{tileHeight}+#{offsetX}+#{offsetY} #{inputFilePath}[0] - | convert -depth 8 -size #{tileWidth}x#{tileHeight} rgb:- #{outputFilePath}</parameterString>
23       <winParameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -map rgb -storage-type char -extract #{tileWidth}x#{tileHeight}+#{offsetX}+#{offsetY} #{inputFilePath}[0] - | convert -depth 8 -size #{tileWidth}x#{tileHeight} rgb:- #{outputFilePath}</winParameterString>
24       <installationDirective>You need to install ImageMagick.</installationDirective>
25     </command>
26
27     <command name="resizer" enabled="true">
28       <commandLine>${cspace.im.root}convert</commandLine>
29       <parameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -depth #{targetDepth} #{inputFilePath}[0] jpg:- | convert - -resize #{targetWidth}x#{targetHeight} #{outputFilePath}</parameterString>
30       <winParameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -depth #{targetDepth} #{inputFilePath}[0] -resize #{targetWidth}x#{targetHeight} #{outputFilePath}</winParameterString>
31       <installationDirective>You need to install ImageMagick.</installationDirective>
32     </command>
33
34     <command name="gifResizer" enabled="true">
35       <commandLine>${cspace.im.root}convert</commandLine>
36       <parameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -depth #{targetDept h} #{inputFilePath}[0] -coalesce -resize #{targetWidth}x#{targetHeight} -deconstruct #{outputFilePath}</parameterString>
37       <installationDirective>You need to install ImageMagick.</installationDirective>
38     </command>
39
40     <command name="jpegResizer" enabled="true">
41       <commandLine>${cspace.im.root}convert</commandLine>
42       <parameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -background white -flatten -depth #{targetDepth} #{inputFilePath}[0] jpg:- | convert - -resize #{targetWidth}x#{targetHeight} #{outputFilePath}</parameterString>
43       <winParameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -background white -flatten -depth #{targetDepth} #{inputFilePath}[0] -resize #{targetWidth}x#{targetHeight} #{outputFilePath}</winParameterString>
44       <installationDirective>You need to install ImageMagick.</installationDirective>
45     </command>
46
47     <command name="rotate" enabled="true">
48       <commandLine>${cspace.im.root}convert</commandLine>
49       <parameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet #{inputFilePath}[0] -rotate #{angle} #{outputFilePath}</parameterString>
50       <winParameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet #{inputFilePath}[0] -rotate #{angle} #{outputFilePath}</winParameterString>
51       <installationDirective>You need to install ImageMagick.</installationDirective>
52     </command>
53
54     <command name="cropAndResize" enabled="true">
55       <commandLine>${cspace.im.root}stream</commandLine>
56       <parameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -map #{mapComponents} -storage-type char -extract #{tileWidth}x#{tileHeight}+#{offsetX}+#{offsetY} #{inputFilePath}[0] - | convert -depth 8 -size #{tileWidth}x#{tileHeight} -resize #{targetWidth}x#{targetHeight}! #{mapComponents}:- #{outputFilePath}</parameterString>
57       <installationDirective>You need to install ImageMagick.</installationDirective>
58     </command>
59
60     <command name="multiTiler" enabled="true">
61       <commandLine>${cspace.im.root}convert</commandLine>
62       <parameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet #{inputFilePath}[0] -crop #{tileWidth}x#{tileHeight} +repage #{outputFilePath}</parameterString>
63       <installationDirective>You need to install ImageMagick.</installationDirective>
64     </command>
65
66   </extension>
67
68 </component>