From: Michael Ritter Date: Fri, 5 Jan 2024 22:30:20 +0000 (-0700) Subject: DRYD-1251: UCB ImageMagick Config Contrib (#381) X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=9925ac28956d7da3cc92add874840a559c0f4e7d;p=tmp%2Fjakarta-migration.git DRYD-1251: UCB ImageMagick Config Contrib (#381) Co-authored-by: Richard Millet Co-authored-by: Ray Lee --- diff --git a/3rdparty/nuxeo/nuxeo-platform-collectionspace/build.xml b/3rdparty/nuxeo/nuxeo-platform-collectionspace/build.xml index 91b1cab0f..1c580e54a 100644 --- a/3rdparty/nuxeo/nuxeo-platform-collectionspace/build.xml +++ b/3rdparty/nuxeo/nuxeo-platform-collectionspace/build.xml @@ -61,6 +61,7 @@ + diff --git a/3rdparty/nuxeo/nuxeo-platform-collectionspace/pom.xml b/3rdparty/nuxeo/nuxeo-platform-collectionspace/pom.xml index f494fbb83..e393ad5ae 100644 --- a/3rdparty/nuxeo/nuxeo-platform-collectionspace/pom.xml +++ b/3rdparty/nuxeo/nuxeo-platform-collectionspace/pom.xml @@ -13,7 +13,25 @@ Nuxeo CollectionSpace core extension Nuxeo Enterprise Platform: CS extensions + + + + + + + ../../../build.properties + + + + src/main/resources + true + + org.apache.maven.plugins diff --git a/3rdparty/nuxeo/nuxeo-platform-collectionspace/src/main/resources/META-INF/MANIFEST.MF b/3rdparty/nuxeo/nuxeo-platform-collectionspace/src/main/resources/META-INF/MANIFEST.MF index e5cac9795..556b93e2c 100644 --- a/3rdparty/nuxeo/nuxeo-platform-collectionspace/src/main/resources/META-INF/MANIFEST.MF +++ b/3rdparty/nuxeo/nuxeo-platform-collectionspace/src/main/resources/META-INF/MANIFEST.MF @@ -8,12 +8,14 @@ Bundle-Vendor: Nuxeo 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 diff --git a/3rdparty/nuxeo/nuxeo-platform-collectionspace/src/main/resources/OSGI-INF/commandline-imagemagick-contrib.xml b/3rdparty/nuxeo/nuxeo-platform-collectionspace/src/main/resources/OSGI-INF/commandline-imagemagick-contrib.xml new file mode 100644 index 000000000..88f4d4661 --- /dev/null +++ b/3rdparty/nuxeo/nuxeo-platform-collectionspace/src/main/resources/OSGI-INF/commandline-imagemagick-contrib.xml @@ -0,0 +1,68 @@ + + + + + org.nuxeo.ecm.platform.commandline.executor.service.defaultContrib + + + + + ${cspace.im.root}identify + -define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -ping -format '%m %w %h %z %[colorspace]' #{inputFilePath}[0] + -define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -ping -format "%m %w %h %z %[colorspace]" #{inputFilePath}[0] + You need to install ImageMagick. + + + + ${cspace.im.root}stream + -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} + -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} + You need to install ImageMagick. + + + + ${cspace.im.root}convert + -define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -depth #{targetDepth} #{inputFilePath}[0] jpg:- | convert - -resize #{targetWidth}x#{targetHeight} #{outputFilePath} + -define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -depth #{targetDepth} #{inputFilePath}[0] -resize #{targetWidth}x#{targetHeight} #{outputFilePath} + You need to install ImageMagick. + + + + ${cspace.im.root}convert + -define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -depth #{targetDept h} #{inputFilePath}[0] -coalesce -resize #{targetWidth}x#{targetHeight} -deconstruct #{outputFilePath} + You need to install ImageMagick. + + + + ${cspace.im.root}convert + -define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -background white -flatten -depth #{targetDepth} #{inputFilePath}[0] jpg:- | convert - -resize #{targetWidth}x#{targetHeight} #{outputFilePath} + -define registry:temporary-path=#{nuxeo.tmp.dir} -quiet -background white -flatten -depth #{targetDepth} #{inputFilePath}[0] -resize #{targetWidth}x#{targetHeight} #{outputFilePath} + You need to install ImageMagick. + + + + ${cspace.im.root}convert + -define registry:temporary-path=#{nuxeo.tmp.dir} -quiet #{inputFilePath}[0] -rotate #{angle} #{outputFilePath} + -define registry:temporary-path=#{nuxeo.tmp.dir} -quiet #{inputFilePath}[0] -rotate #{angle} #{outputFilePath} + You need to install ImageMagick. + + + + ${cspace.im.root}stream + -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} + You need to install ImageMagick. + + + + ${cspace.im.root}convert + -define registry:temporary-path=#{nuxeo.tmp.dir} -quiet #{inputFilePath}[0] -crop #{tileWidth}x#{tileHeight} +repage #{outputFilePath} + You need to install ImageMagick. + + + + + diff --git a/3rdparty/nuxeo/nuxeo-server/9.10-HF30/bundles/nuxeo-platform-convert-9.10-HF28.jar b/3rdparty/nuxeo/nuxeo-server/9.10-HF30/bundles/nuxeo-platform-convert-9.10-HF30.jar similarity index 85% rename from 3rdparty/nuxeo/nuxeo-server/9.10-HF30/bundles/nuxeo-platform-convert-9.10-HF28.jar rename to 3rdparty/nuxeo/nuxeo-server/9.10-HF30/bundles/nuxeo-platform-convert-9.10-HF30.jar index c46e04b87..bcbf49836 100644 Binary files a/3rdparty/nuxeo/nuxeo-server/9.10-HF30/bundles/nuxeo-platform-convert-9.10-HF28.jar and b/3rdparty/nuxeo/nuxeo-server/9.10-HF30/bundles/nuxeo-platform-convert-9.10-HF30.jar differ diff --git a/build.properties b/build.properties index ddfe6f4a9..90b141653 100644 --- a/build.properties +++ b/build.properties @@ -19,6 +19,11 @@ cspace.services.context=${domain.cspace} cspace.services.war=${cspace.services.context}.war domain.nuxeo=nuxeo-server +# ImageMagick's bin directory +# Leave empty for default behavior. Otherwise, provide the fully qualified path +# to ImageMagick's bin directory -- you must include a trailing '/' character +cspace.im.root= + # UI settings cspace.ui.package.name=cspace-ui cspace.ui.library.name=cspaceUI