Require-Bundle: org.nuxeo.runtime,
org.nuxeo.ecm.core.api,
org.nuxeo.ecm.core,
- org.nuxeo.ecm.webapp.core
+ org.nuxeo.ecm.webapp.core,
+ org.nuxeo.ecm.platform.commandline.executor.service.defaultContrib
Provide-Package: org.collectionspace.shared
Nuxeo-Component: OSGI-INF/core-types-contrib.xml,
OSGI-INF/default-life-cycle-contrib.xml,
OSGI-INF/ecm-types-contrib.xml,
OSGI-INF/layouts-contrib.xml,
- OSGI-INF/querymodel-contrib.xml
+ OSGI-INF/querymodel-contrib.xml,
+ OSGI-INF/commandline-imagemagick-contrib.xml
--- /dev/null
+<?xml version="1.0"?>
+<!--
+ This file is based on nuxeo-platform-imaging-core-9.10.jar/OSGI-INF/commandline-imagemagick-contrib.xml
+
+ Reference: https://explorer.nuxeo.com/nuxeo/site/distribution/Nuxeo%20Platform%20LTS%202017-9.10/viewContribution/org.nuxeo.ecm.platform.picture.commandline.imagemagick--command
+-->
+<component name="cspace.org.nuxeo.ecm.platform.picture.commandline.imagemagick">
+
+ <require>org.nuxeo.ecm.platform.commandline.executor.service.defaultContrib</require>
+
+ <extension target="org.nuxeo.ecm.platform.commandline.executor.service.CommandLineExecutorComponent" point="command">
+
+ <command name="identify" enabled="true">
+ <commandLine>${cspace.im.root}identify</commandLine>
+ <parameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -ping -format '%m %w %h %z %[colorspace]' #{inputFilePath}[0]</parameterString>
+ <winParameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -ping -format "%m %w %h %z %[colorspace]" #{inputFilePath}[0]</winParameterString>
+ <installationDirective>You need to install ImageMagick.</installationDirective>
+ </command>
+
+ <command name="crop" enabled="true">
+ <commandLine>${cspace.im.root}stream</commandLine>
+ <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>
+ <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>
+ <installationDirective>You need to install ImageMagick.</installationDirective>
+ </command>
+
+ <command name="resizer" enabled="true">
+ <commandLine>${cspace.im.root}convert</commandLine>
+ <parameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -depth #{targetDepth} #{inputFilePath}[0] jpg:- | convert - -resize #{targetWidth}x#{targetHeight} #{outputFilePath}</parameterString>
+ <winParameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -depth #{targetDepth} #{inputFilePath}[0] -resize #{targetWidth}x#{targetHeight} #{outputFilePath}</winParameterString>
+ <installationDirective>You need to install ImageMagick.</installationDirective>
+ </command>
+
+ <command name="gifResizer" enabled="true">
+ <commandLine>${cspace.im.root}convert</commandLine>
+ <parameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -depth #{targetDept h} #{inputFilePath}[0] -coalesce -resize #{targetWidth}x#{targetHeight} -deconstruct #{outputFilePath}</parameterString>
+ <installationDirective>You need to install ImageMagick.</installationDirective>
+ </command>
+
+ <command name="jpegResizer" enabled="true">
+ <commandLine>${cspace.im.root}convert</commandLine>
+ <parameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -background white -flatten -depth #{targetDepth} #{inputFilePath}[0] jpg:- | convert - -resize #{targetWidth}x#{targetHeight} #{outputFilePath}</parameterString>
+ <winParameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -background white -flatten -depth #{targetDepth} #{inputFilePath}[0] -resize #{targetWidth}x#{targetHeight} #{outputFilePath}</winParameterString>
+ <installationDirective>You need to install ImageMagick.</installationDirective>
+ </command>
+
+ <command name="rotate" enabled="true">
+ <commandLine>${cspace.im.root}convert</commandLine>
+ <parameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet #{inputFilePath}[0] -rotate #{angle} #{outputFilePath}</parameterString>
+ <winParameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet #{inputFilePath}[0] -rotate #{angle} #{outputFilePath}</winParameterString>
+ <installationDirective>You need to install ImageMagick.</installationDirective>
+ </command>
+
+ <command name="cropAndResize" enabled="true">
+ <commandLine>${cspace.im.root}stream</commandLine>
+ <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>
+ <installationDirective>You need to install ImageMagick.</installationDirective>
+ </command>
+
+ <command name="multiTiler" enabled="true">
+ <commandLine>${cspace.im.root}convert</commandLine>
+ <parameterString>-define registry:temporary-path=#{nuxeo.tmp.dir} -quiet #{inputFilePath}[0] -crop #{tileWidth}x#{tileHeight} +repage #{outputFilePath}</parameterString>
+ <installationDirective>You need to install ImageMagick.</installationDirective>
+ </command>
+
+ </extension>
+
+</component>