mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-07-31 17:38:33 +00:00
HXENG-64 refactor ATS (#657)
Refactor to clean up packages in the t-model and to introduce a simpler to implement t-engine base. The new t-engines (tika, imagemagick, libreoffice, pdfrenderer, misc, aio, aspose) and t-router may be used in combination with older components as the API between the content Repo and between components has not changed. As far as possible the same artifacts are created (the -boot projects no longer exist). They may be used with older ACS repo versions. The main changes to look for are: * The introduction of TransformEngine and CustomTransformer interfaces to be implemented. * The removal in t-engines and t-router of the Controller, Application, test template page, Controller tests and application config, as this is all now done by the t-engine base package. * The t-router now extends the t-engine base, which also reduced the amount of duplicate code. * The t-engine base provides the test page, which includes drop downs of known transform options. The t-router is able to use pipeline and failover transformers. This was not possible to do previously as the router had no test UI. * Resources including licenses are automatically included in the all-in-one t-engine, from the individual t-engines. They just need to be added as dependencies in the pom. * The ugly code in the all-in-one t-engine and misc t-engine to pick transformers has gone, as they are now just selected by the transformRegistry. * The way t-engines respond to http or message queue transform requests has been combined (eliminates the similar but different code that existed before). * The t-engine base now uses InputStream and OutputStream rather than Files by default. As a result it will be simpler to avoid writing content to a temporary location. * A number of the Tika and Misc CustomTransforms no longer use Files. * The original t-engine base still exists so customers can continue to create custom t-engines the way they have done previously. the project has just been moved into a folder called deprecated. * The folder structure has changed. The long "alfresco-transform-..." names have given way to shorter easier to read and type names. * The t-engine project structure now has a single project rather than two. * The previous config values still exist, but there are now a new set for config values for in files with names that don't misleadingly imply they only contain pipeline of routing information. * The concept of 'routing' has much less emphasis in class names as the code just uses the transformRegistry. * TransformerConfig may now be read as json or yaml. The restrictions about what could be specified in yaml has gone. * T-engines and t-router may use transform config from files. Previously it was just the t-router. * The POC code to do with graphs of possible routes has been removed. * All master branch changes have been merged in. * The concept of a single transform request which results in multiple responses (e.g. images from a video) has been added to the core processing of requests in the t-engine base. * Many SonarCloud linter fixes.
This commit is contained in:
1
engines/imagemagick/.maven-dockerignore
Normal file
1
engines/imagemagick/.maven-dockerignore
Normal file
@@ -0,0 +1 @@
|
||||
target/docker/
|
42
engines/imagemagick/Dockerfile
Normal file
42
engines/imagemagick/Dockerfile
Normal file
@@ -0,0 +1,42 @@
|
||||
# Image provides a container in which to run ImageMagick transformations for Alfresco Content Services.
|
||||
|
||||
# ImageMagick is from ImageMagick Studio LLC. See the license at http://www.imagemagick.org/script/license.php or in /ImageMagick-license.txt.
|
||||
|
||||
FROM alfresco/alfresco-base-java:jre17-rockylinux8-202207110835
|
||||
|
||||
# For other ImageMagick versions please look at https://github.com/Alfresco/imagemagick-build tags
|
||||
ARG IMAGEMAGICK_VERSION=7.1.0-16
|
||||
|
||||
ENV IMAGEMAGICK_RPM_URL=https://github.com/Alfresco/imagemagick-build/releases/download/v${IMAGEMAGICK_VERSION}/ImageMagick-${IMAGEMAGICK_VERSION}.x86_64.rpm
|
||||
ENV IMAGEMAGICK_LIB_RPM_URL=https://github.com/Alfresco/imagemagick-build/releases/download/v${IMAGEMAGICK_VERSION}/ImageMagick-libs-${IMAGEMAGICK_VERSION}.x86_64.rpm
|
||||
ENV IMAGEMAGICK_DEP_RPM_URL=https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
||||
ENV JAVA_OPTS=""
|
||||
|
||||
# Set default user information
|
||||
ARG GROUPNAME=Alfresco
|
||||
ARG GROUPID=1000
|
||||
ARG IMAGEUSERNAME=imagemagick
|
||||
ARG USERID=33002
|
||||
|
||||
COPY target/${env.project_artifactId}-${env.project_version}.jar /usr/bin
|
||||
|
||||
RUN ln /usr/bin/${env.project_artifactId}-${env.project_version}.jar /usr/bin/${env.project_artifactId}.jar && \
|
||||
yum install -y $IMAGEMAGICK_DEP_RPM_URL && \
|
||||
yum install -y $IMAGEMAGICK_LIB_RPM_URL $IMAGEMAGICK_RPM_URL && \
|
||||
yum clean all && \
|
||||
rpm -e --nodeps libgs
|
||||
|
||||
ADD target/generated-resources/licenses /licenses
|
||||
ADD target/generated-resources/licenses.xml /licenses/
|
||||
ADD target/generated-sources/license/THIRD-PARTY.txt /licenses/
|
||||
COPY target/classes/licenses/3rd-party/ /
|
||||
|
||||
RUN groupadd -g ${GROUPID} ${GROUPNAME} && \
|
||||
useradd -u ${USERID} -G ${GROUPNAME} ${IMAGEUSERNAME} && \
|
||||
chgrp -R ${GROUPNAME} /usr/bin/${env.project_artifactId}.jar
|
||||
|
||||
EXPOSE 8090
|
||||
|
||||
USER ${IMAGEUSERNAME}
|
||||
|
||||
ENTRYPOINT java $JAVA_OPTS -jar /usr/bin/${env.project_artifactId}.jar
|
5
engines/imagemagick/LICENSES.md
Normal file
5
engines/imagemagick/LICENSES.md
Normal file
@@ -0,0 +1,5 @@
|
||||
### Licenses
|
||||
|
||||
* ImageMagick is from ImageMagick Studio LLC. See the license at [http://www.imagemagick.org/script/license.php](http://www.imagemagick.org/script/license.php)
|
||||
or the [ImageMagick-license.txt](src/main/resources/licenses/3rd-party/ImageMagick-license.txt)
|
||||
file placed in the root directory of the docker image.
|
292
engines/imagemagick/pom.xml
Normal file
292
engines/imagemagick/pom.xml
Normal file
@@ -0,0 +1,292 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>alfresco-transform-imagemagick</artifactId>
|
||||
<name>- ImageMagick</name>
|
||||
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-transform-core</artifactId>
|
||||
<version>3.0.0-HXP-A10-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<image.name>alfresco/alfresco-imagemagick</image.name>
|
||||
<image.registry>quay.io</image.registry>
|
||||
<env.project_artifactId>${project.artifactId}</env.project_artifactId>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-base-t-engine</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-base-t-engine</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<classifier>tests</classifier>
|
||||
<type>test-jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.vaadin.external.google</groupId>
|
||||
<artifactId>android-json</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<mainClass>org.alfresco.transform.base.Application</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>license-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>test-jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>docker-it-setup</id>
|
||||
<!-- raises an ActiveMq container for the Integration Tests -->
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>integration-tests</id>
|
||||
<goals>
|
||||
<goal>start</goal>
|
||||
<goal>stop</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<images>
|
||||
<image>
|
||||
<name>alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8</name>
|
||||
<run>
|
||||
<hostname>activemq</hostname>
|
||||
<ports>
|
||||
<port>8161:8161</port>
|
||||
<port>5672:5672</port>
|
||||
<port>61616:61616</port>
|
||||
</ports>
|
||||
<wait>
|
||||
<log>Apache ActiveMQ 5.17.1 .* started</log>
|
||||
<time>20000</time>
|
||||
<kill>500</kill>
|
||||
<shutdown>100</shutdown>
|
||||
<exec>
|
||||
<preStop>kill 1</preStop>
|
||||
<preStop>kill -9 1</preStop>
|
||||
</exec>
|
||||
</wait>
|
||||
</run>
|
||||
</image>
|
||||
<image>
|
||||
<name>${image.name}:${image.tag}</name>
|
||||
<run>
|
||||
<ports>
|
||||
<port>8090:8090</port>
|
||||
</ports>
|
||||
<wait>
|
||||
<http>
|
||||
<url>http://localhost:8090/transform/config</url>
|
||||
<method>GET</method>
|
||||
<status>200...299</status>
|
||||
</http>
|
||||
<time>300000</time>
|
||||
<kill>500</kill>
|
||||
<shutdown>100</shutdown>
|
||||
<exec>
|
||||
<preStop>kill 1</preStop>
|
||||
<preStop>kill -9 1</preStop>
|
||||
</exec>
|
||||
</wait>
|
||||
</run>
|
||||
</image>
|
||||
</images>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>local</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-image</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<images>
|
||||
<image>
|
||||
<name>${image.name}:${image.tag}</name>
|
||||
<build>
|
||||
<contextDir>${project.basedir}</contextDir>
|
||||
<buildOptions>
|
||||
<squash>true</squash>
|
||||
</buildOptions>
|
||||
</build>
|
||||
</image>
|
||||
</images>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>internal</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<images>
|
||||
<!-- QuayIO image -->
|
||||
<image>
|
||||
<name>${image.name}:${image.tag}</name>
|
||||
<registry>${image.registry}</registry>
|
||||
<build>
|
||||
<contextDir>${project.basedir}</contextDir>
|
||||
<buildOptions>
|
||||
<squash>true</squash>
|
||||
</buildOptions>
|
||||
</build>
|
||||
</image>
|
||||
<!-- DockerHub image -->
|
||||
<image>
|
||||
<name>${image.name}:${image.tag}</name>
|
||||
<build>
|
||||
<contextDir>${project.basedir}</contextDir>
|
||||
<buildOptions>
|
||||
<squash>true</squash>
|
||||
</buildOptions>
|
||||
</build>
|
||||
</image>
|
||||
</images>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-image</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>push-image</id>
|
||||
<phase>install</phase>
|
||||
<goals>
|
||||
<goal>push</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<images>
|
||||
<!-- QuayIO image -->
|
||||
<image>
|
||||
<name>${image.name}:${project.version}</name>
|
||||
<registry>${image.registry}</registry>
|
||||
<build>
|
||||
<contextDir>${project.basedir}</contextDir>
|
||||
<buildOptions>
|
||||
<squash>true</squash>
|
||||
</buildOptions>
|
||||
</build>
|
||||
</image>
|
||||
<!-- DockerHub image -->
|
||||
<image>
|
||||
<name>${image.name}:${project.version}</name>
|
||||
<build>
|
||||
<contextDir>${project.basedir}</contextDir>
|
||||
<buildOptions>
|
||||
<squash>true</squash>
|
||||
</buildOptions>
|
||||
</build>
|
||||
</image>
|
||||
</images>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
<goal>push</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
@@ -0,0 +1,360 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Transform Core
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* -
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* -
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.transform.imagemagick;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
import static org.alfresco.transform.base.util.Util.stringToBoolean;
|
||||
import static org.alfresco.transform.base.util.Util.stringToInteger;
|
||||
import static org.springframework.http.HttpStatus.BAD_REQUEST;
|
||||
|
||||
/**
|
||||
* ImageMagick options builder.
|
||||
*
|
||||
* @author Cezar Leahu
|
||||
*/
|
||||
public final class ImageMagickOptionsBuilder
|
||||
{
|
||||
private static final List<String> GRAVITY_VALUES = ImmutableList.of("North", "NorthEast",
|
||||
"East", "SouthEast", "South", "SouthWest", "West", "NorthWest", "Center");
|
||||
|
||||
private Integer startPage;
|
||||
private Integer endPage;
|
||||
private Boolean alphaRemove;
|
||||
private Boolean autoOrient;
|
||||
private String cropGravity;
|
||||
private Integer cropWidth;
|
||||
private Integer cropHeight;
|
||||
private Boolean cropPercentage;
|
||||
private Integer cropXOffset;
|
||||
private Integer cropYOffset;
|
||||
private Boolean thumbnail;
|
||||
private Integer resizeWidth;
|
||||
private Integer resizeHeight;
|
||||
private Boolean resizePercentage;
|
||||
private Boolean allowEnlargement;
|
||||
private Boolean maintainAspectRatio;
|
||||
private String commandOptions;
|
||||
|
||||
private ImageMagickOptionsBuilder() {}
|
||||
|
||||
public ImageMagickOptionsBuilder withStartPage(final String startPage)
|
||||
{
|
||||
return withStartPage(stringToInteger(startPage));
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withStartPage(final Integer startPage)
|
||||
{
|
||||
this.startPage = startPage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withEndPage(final String endPage)
|
||||
{
|
||||
return withEndPage(stringToInteger(endPage));
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withEndPage(final Integer endPage)
|
||||
{
|
||||
this.endPage = endPage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withAlphaRemove(final String alphaRemove)
|
||||
{
|
||||
return withAlphaRemove(stringToBoolean(alphaRemove));
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withAlphaRemove(final Boolean alphaRemove)
|
||||
{
|
||||
this.alphaRemove = alphaRemove;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withAutoOrient(final String autoOrient)
|
||||
{
|
||||
return withAutoOrient(stringToBoolean(autoOrient));
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withAutoOrient(final Boolean autoOrient)
|
||||
{
|
||||
this.autoOrient = autoOrient == null ? true : autoOrient;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withCropGravity(final String cropGravity)
|
||||
{
|
||||
this.cropGravity = cropGravity;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withCropWidth(final String cropWidth)
|
||||
{
|
||||
return withCropWidth(stringToInteger(cropWidth));
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withCropWidth(final Integer cropWidth)
|
||||
{
|
||||
this.cropWidth = cropWidth;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withCropHeight(final String cropHeight)
|
||||
{
|
||||
return withCropHeight(stringToInteger(cropHeight));
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withCropHeight(final Integer cropHeight)
|
||||
{
|
||||
this.cropHeight = cropHeight;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withCropPercentage(final String cropPercentage)
|
||||
{
|
||||
return withCropPercentage(stringToBoolean(cropPercentage));
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withCropPercentage(final Boolean cropPercentage)
|
||||
{
|
||||
this.cropPercentage = cropPercentage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withCropXOffset(final String cropXOffset)
|
||||
{
|
||||
return withCropXOffset(stringToInteger(cropXOffset));
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withCropXOffset(final Integer cropXOffset)
|
||||
{
|
||||
this.cropXOffset = cropXOffset;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withCropYOffset(final String cropYOffset)
|
||||
{
|
||||
return withCropYOffset(stringToInteger(cropYOffset));
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withCropYOffset(final Integer cropYOffset)
|
||||
{
|
||||
this.cropYOffset = cropYOffset;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withThumbnail(final String thumbnail)
|
||||
{
|
||||
return withThumbnail(stringToBoolean(thumbnail));
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withThumbnail(final Boolean thumbnail)
|
||||
{
|
||||
this.thumbnail = thumbnail;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withResizeWidth(final String resizeWidth)
|
||||
{
|
||||
return withResizeWidth(stringToInteger(resizeWidth));
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withResizeWidth(final Integer resizeWidth)
|
||||
{
|
||||
this.resizeWidth = resizeWidth;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withResizeHeight(final String resizeHeight)
|
||||
{
|
||||
return withResizeHeight(stringToInteger(resizeHeight));
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withResizeHeight(final Integer resizeHeight)
|
||||
{
|
||||
this.resizeHeight = resizeHeight;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withResizePercentage(final String resizePercentage)
|
||||
{
|
||||
return withResizePercentage(stringToBoolean(resizePercentage));
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withResizePercentage(final Boolean resizePercentage)
|
||||
{
|
||||
this.resizePercentage = resizePercentage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withAllowEnlargement(final String allowEnlargement)
|
||||
{
|
||||
return withAllowEnlargement(stringToBoolean(allowEnlargement));
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withAllowEnlargement(final Boolean allowEnlargement)
|
||||
{
|
||||
this.allowEnlargement = allowEnlargement == null ? true : allowEnlargement;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withMaintainAspectRatio(final String maintainAspectRatio)
|
||||
{
|
||||
return withMaintainAspectRatio(stringToBoolean(maintainAspectRatio));
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withMaintainAspectRatio(final Boolean maintainAspectRatio)
|
||||
{
|
||||
this.maintainAspectRatio = maintainAspectRatio;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ImageMagickOptionsBuilder withCommandOptions(final String commandOptions)
|
||||
{
|
||||
this.commandOptions = commandOptions;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String build()
|
||||
{
|
||||
if (cropGravity != null)
|
||||
{
|
||||
cropGravity = cropGravity.trim();
|
||||
if (cropGravity.isEmpty())
|
||||
{
|
||||
cropGravity = null;
|
||||
}
|
||||
else if (!GRAVITY_VALUES.contains(cropGravity))
|
||||
{
|
||||
throw new TransformException(BAD_REQUEST, "Invalid cropGravity value");
|
||||
}
|
||||
}
|
||||
|
||||
StringJoiner args = new StringJoiner(" ");
|
||||
if (alphaRemove != null && alphaRemove)
|
||||
{
|
||||
args.add("-alpha");
|
||||
args.add(("remove"));
|
||||
}
|
||||
if (autoOrient != null && autoOrient)
|
||||
{
|
||||
args.add("-auto-orient");
|
||||
}
|
||||
|
||||
if (cropGravity != null || cropWidth != null || cropHeight != null || cropPercentage != null ||
|
||||
cropXOffset != null || cropYOffset != null)
|
||||
{
|
||||
if (cropGravity != null)
|
||||
{
|
||||
args.add("-gravity");
|
||||
args.add(cropGravity);
|
||||
}
|
||||
|
||||
StringBuilder crop = new StringBuilder();
|
||||
if (cropWidth != null && cropWidth >= 0)
|
||||
{
|
||||
crop.append(cropWidth);
|
||||
}
|
||||
if (cropHeight != null && cropHeight >= 0)
|
||||
{
|
||||
crop.append('x');
|
||||
crop.append(cropHeight);
|
||||
}
|
||||
if (cropPercentage != null && cropPercentage)
|
||||
{
|
||||
crop.append('%');
|
||||
}
|
||||
if (cropXOffset != null)
|
||||
{
|
||||
if (cropXOffset >= 0)
|
||||
{
|
||||
crop.append('+');
|
||||
}
|
||||
crop.append(cropXOffset);
|
||||
}
|
||||
if (cropYOffset != null)
|
||||
{
|
||||
if (cropYOffset >= 0)
|
||||
{
|
||||
crop.append('+');
|
||||
}
|
||||
crop.append(cropYOffset);
|
||||
}
|
||||
if (crop.length() > 1)
|
||||
{
|
||||
args.add("-crop");
|
||||
args.add(crop);
|
||||
}
|
||||
|
||||
args.add("+repage");
|
||||
}
|
||||
|
||||
if (resizeHeight != null || resizeWidth != null || resizePercentage != null || maintainAspectRatio != null)
|
||||
{
|
||||
args.add(thumbnail != null && thumbnail ? "-thumbnail" : "-resize");
|
||||
StringBuilder resize = new StringBuilder();
|
||||
if (resizeWidth != null && resizeWidth >= 0)
|
||||
{
|
||||
resize.append(resizeWidth);
|
||||
}
|
||||
if (resizeHeight != null && resizeHeight >= 0)
|
||||
{
|
||||
resize.append('x');
|
||||
resize.append(resizeHeight);
|
||||
}
|
||||
if (resizePercentage != null && resizePercentage)
|
||||
{
|
||||
resize.append('%');
|
||||
}
|
||||
if (allowEnlargement == null || !allowEnlargement)
|
||||
{
|
||||
resize.append('>');
|
||||
}
|
||||
if (maintainAspectRatio != null && !maintainAspectRatio)
|
||||
{
|
||||
resize.append('!');
|
||||
}
|
||||
if (resize.length() > 1)
|
||||
{
|
||||
args.add(resize);
|
||||
}
|
||||
}
|
||||
|
||||
return (commandOptions == null || "".equals(
|
||||
commandOptions.trim()) ? "" : commandOptions + ' ') +
|
||||
args.toString();
|
||||
}
|
||||
|
||||
public static ImageMagickOptionsBuilder builder()
|
||||
{
|
||||
return new ImageMagickOptionsBuilder();
|
||||
}
|
||||
}
|
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Transform Core
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* -
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* -
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.transform.imagemagick;
|
||||
|
||||
import org.alfresco.transform.base.TransformEngine;
|
||||
import org.alfresco.transform.base.probes.ProbeTransform;
|
||||
import org.alfresco.transform.config.reader.TransformConfigResourceReader;
|
||||
import org.alfresco.transform.config.TransformConfig;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import static org.alfresco.transform.base.logging.StandardMessages.COMMUNITY_LICENCE;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_JPEG;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_PNG;
|
||||
|
||||
@Component
|
||||
public class ImageMagickTransformEngine implements TransformEngine
|
||||
{
|
||||
@Autowired
|
||||
private TransformConfigResourceReader transformConfigResourceReader;
|
||||
|
||||
@Override
|
||||
public String getTransformEngineName()
|
||||
{
|
||||
return "0030 ImageMagick";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStartupMessage()
|
||||
{
|
||||
return COMMUNITY_LICENCE +
|
||||
"This transformer uses ImageMagick from ImageMagick Studio LLC. " +
|
||||
"See the license at http://www.imagemagick.org/script/license.php or in /ImageMagick-license.txt";
|
||||
}
|
||||
|
||||
@Override
|
||||
public TransformConfig getTransformConfig()
|
||||
{
|
||||
return transformConfigResourceReader.read("classpath:imagemagick_engine_config.json");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProbeTransform getProbeTransform()
|
||||
{
|
||||
return new ProbeTransform("probe.jpg", MIMETYPE_IMAGE_JPEG, MIMETYPE_IMAGE_PNG, Collections.emptyMap(),
|
||||
25383, 1024, 150, 1024, 60 * 15 + 1, 60 * 15);
|
||||
}
|
||||
}
|
@@ -0,0 +1,196 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Transform Core
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* -
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* -
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.transform.imagemagick.transformers;
|
||||
|
||||
import org.alfresco.transform.base.TransformManager;
|
||||
import org.alfresco.transform.base.executors.AbstractCommandExecutor;
|
||||
import org.alfresco.transform.base.executors.RuntimeExec;
|
||||
import org.alfresco.transform.base.util.CustomTransformerFileAdaptor;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.alfresco.transform.imagemagick.ImageMagickOptionsBuilder;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.alfresco.transform.base.util.Util.stringToInteger;
|
||||
import static org.alfresco.transform.base.util.Util.stringToLong;
|
||||
import static org.alfresco.transform.common.RequestParamMap.ALLOW_ENLARGEMENT;
|
||||
import static org.alfresco.transform.common.RequestParamMap.ALPHA_REMOVE;
|
||||
import static org.alfresco.transform.common.RequestParamMap.AUTO_ORIENT;
|
||||
import static org.alfresco.transform.common.RequestParamMap.COMMAND_OPTIONS;
|
||||
import static org.alfresco.transform.common.RequestParamMap.CROP_GRAVITY;
|
||||
import static org.alfresco.transform.common.RequestParamMap.CROP_HEIGHT;
|
||||
import static org.alfresco.transform.common.RequestParamMap.CROP_PERCENTAGE;
|
||||
import static org.alfresco.transform.common.RequestParamMap.CROP_WIDTH;
|
||||
import static org.alfresco.transform.common.RequestParamMap.CROP_X_OFFSET;
|
||||
import static org.alfresco.transform.common.RequestParamMap.CROP_Y_OFFSET;
|
||||
import static org.alfresco.transform.common.RequestParamMap.END_PAGE;
|
||||
import static org.alfresco.transform.common.RequestParamMap.MAINTAIN_ASPECT_RATIO;
|
||||
import static org.alfresco.transform.common.RequestParamMap.RESIZE_HEIGHT;
|
||||
import static org.alfresco.transform.common.RequestParamMap.RESIZE_PERCENTAGE;
|
||||
import static org.alfresco.transform.common.RequestParamMap.RESIZE_WIDTH;
|
||||
import static org.alfresco.transform.common.RequestParamMap.START_PAGE;
|
||||
import static org.alfresco.transform.common.RequestParamMap.THUMBNAIL;
|
||||
import static org.alfresco.transform.common.RequestParamMap.TIMEOUT;
|
||||
|
||||
@Component
|
||||
public class ImageMagickTransformer extends AbstractCommandExecutor implements CustomTransformerFileAdaptor
|
||||
{
|
||||
@Value("${transform.core.imagemagick.exe}")
|
||||
private String exe;
|
||||
@Value("${transform.core.imagemagick.dyn}")
|
||||
private String dyn;
|
||||
@Value("${transform.core.imagemagick.root}")
|
||||
private String root;
|
||||
|
||||
// Not currently used, but may be again in the future if we need an ImageMagick extension
|
||||
@Value("${transform.core.imagemagick.coders}")
|
||||
private String coders;
|
||||
@Value("${transform.core.imagemagick.config}")
|
||||
private String config;
|
||||
|
||||
@PostConstruct
|
||||
private void createCommands()
|
||||
{
|
||||
if (exe == null || exe.isEmpty())
|
||||
{
|
||||
throw new IllegalArgumentException("ImageMagickTransformer IMAGEMAGICK_EXE variable cannot be null or empty");
|
||||
}
|
||||
if (dyn == null || dyn.isEmpty())
|
||||
{
|
||||
throw new IllegalArgumentException("ImageMagickTransformer IMAGEMAGICK_DYN variable cannot be null or empty");
|
||||
}
|
||||
if (root == null || root.isEmpty())
|
||||
{
|
||||
throw new IllegalArgumentException("ImageMagickTransformer IMAGEMAGICK_ROOT variable cannot be null or empty");
|
||||
}
|
||||
|
||||
super.transformCommand = createTransformCommand();
|
||||
super.checkCommand = createCheckCommand();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTransformerName()
|
||||
{
|
||||
return "imagemagick";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected RuntimeExec createTransformCommand()
|
||||
{
|
||||
RuntimeExec runtimeExec = new RuntimeExec();
|
||||
Map<String, String[]> commandsAndArguments = new HashMap<>();
|
||||
commandsAndArguments.put(".*",
|
||||
new String[]{exe, "${source}", "SPLIT:${options}", "-strip", "-quiet", "${target}"});
|
||||
runtimeExec.setCommandsAndArguments(commandsAndArguments);
|
||||
|
||||
Map<String, String> processProperties = new HashMap<>();
|
||||
processProperties.put("MAGICK_HOME", root);
|
||||
processProperties.put("DYLD_FALLBACK_LIBRARY_PATH", dyn);
|
||||
processProperties.put("LD_LIBRARY_PATH", dyn);
|
||||
|
||||
//Optional properties (see also https://imagemagick.org/script/resources.php#environment)
|
||||
if (coders != null && !coders.isBlank())
|
||||
{
|
||||
processProperties.put("MAGICK_CODER_MODULE_PATH", coders);
|
||||
}
|
||||
if (config != null && !config.isBlank())
|
||||
{
|
||||
processProperties.put("MAGICK_CONFIGURE_PATH", config);
|
||||
}
|
||||
runtimeExec.setProcessProperties(processProperties);
|
||||
|
||||
Map<String, String> defaultProperties = new HashMap<>();
|
||||
defaultProperties.put("options", null);
|
||||
runtimeExec.setDefaultProperties(defaultProperties);
|
||||
|
||||
runtimeExec.setErrorCodes(
|
||||
"1,2,255,400,405,410,415,420,425,430,435,440,450,455,460,465,470,475,480,485,490,495,499,700,705,710,715,720,725,730,735,740,750,755,760,765,770,775,780,785,790,795,799");
|
||||
|
||||
return runtimeExec;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected RuntimeExec createCheckCommand()
|
||||
{
|
||||
RuntimeExec runtimeExec = new RuntimeExec();
|
||||
Map<String, String[]> commandsAndArguments = new HashMap<>();
|
||||
commandsAndArguments.put(".*", new String[]{exe, "-version"});
|
||||
runtimeExec.setCommandsAndArguments(commandsAndArguments);
|
||||
return runtimeExec;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void transform(String sourceMimetype, String targetMimetype, Map<String, String> transformOptions,
|
||||
File sourceFile, File targetFile, TransformManager transformManager) throws TransformException
|
||||
{
|
||||
final String options = ImageMagickOptionsBuilder
|
||||
.builder()
|
||||
.withStartPage(transformOptions.get(START_PAGE))
|
||||
.withEndPage(transformOptions.get(END_PAGE))
|
||||
.withAlphaRemove(transformOptions.get(ALPHA_REMOVE))
|
||||
.withAutoOrient(transformOptions.get(AUTO_ORIENT))
|
||||
.withCropGravity(transformOptions.get(CROP_GRAVITY))
|
||||
.withCropWidth(transformOptions.get(CROP_WIDTH))
|
||||
.withCropHeight(transformOptions.get(CROP_HEIGHT))
|
||||
.withCropPercentage(transformOptions.get(CROP_PERCENTAGE))
|
||||
.withCropXOffset(transformOptions.get(CROP_X_OFFSET))
|
||||
.withCropYOffset(transformOptions.get(CROP_Y_OFFSET))
|
||||
.withThumbnail(transformOptions.get(THUMBNAIL))
|
||||
.withResizeWidth(transformOptions.get(RESIZE_WIDTH))
|
||||
.withResizeHeight(transformOptions.get(RESIZE_HEIGHT))
|
||||
.withResizePercentage(transformOptions.get(RESIZE_PERCENTAGE))
|
||||
.withAllowEnlargement(transformOptions.get(ALLOW_ENLARGEMENT))
|
||||
.withMaintainAspectRatio(transformOptions.get(MAINTAIN_ASPECT_RATIO))
|
||||
.withCommandOptions(transformOptions.get(COMMAND_OPTIONS))
|
||||
.build();
|
||||
|
||||
String pageRange = calculatePageRange(
|
||||
stringToInteger(transformOptions.get(START_PAGE)),
|
||||
stringToInteger(transformOptions.get(END_PAGE))
|
||||
);
|
||||
|
||||
Long timeout = stringToLong(transformOptions.get(TIMEOUT));
|
||||
|
||||
run(options, sourceFile, pageRange, targetFile, timeout);
|
||||
}
|
||||
|
||||
private static String calculatePageRange(Integer startPage, Integer endPage)
|
||||
{
|
||||
return startPage == null
|
||||
? endPage == null
|
||||
? ""
|
||||
: "[" + endPage + ']'
|
||||
: endPage == null || startPage.equals(endPage)
|
||||
? "[" + startPage + ']'
|
||||
: "[" + startPage + '-' + endPage + ']';
|
||||
}
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
queue:
|
||||
engineRequestQueue: ${TRANSFORM_ENGINE_REQUEST_QUEUE:org.alfresco.transform.engine.imagemagick.acs}
|
||||
transform:
|
||||
core:
|
||||
imagemagick:
|
||||
root: ${IMAGEMAGICK_ROOT:/usr/lib64/ImageMagick-7.0.10}
|
||||
dyn: ${IMAGEMAGICK_DYN:/usr/lib64/ImageMagick-7.0.10/lib}
|
||||
exe: ${IMAGEMAGICK_EXE:/usr/bin/convert}
|
||||
coders: ${IMAGEMAGICK_CODERS:}
|
||||
config: ${IMAGEMAGICK_CONFIG:}
|
File diff suppressed because it is too large
Load Diff
107
engines/imagemagick/src/main/resources/licenses/3rd-party/ImageMagick-license.txt
vendored
Normal file
107
engines/imagemagick/src/main/resources/licenses/3rd-party/ImageMagick-license.txt
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
The authoritative ImageMagick license can be found at
|
||||
https://imagemagick.org/script/license.php and ImageMagick notices at
|
||||
https://raw.githubusercontent.com/ImageMagick/ImageMagick/main/NOTICE.
|
||||
|
||||
Before we get to the text of the license, lets just review what the license says in simple terms:
|
||||
|
||||
It allows you to:
|
||||
|
||||
* freely download and use ImageMagick software, in whole or in part, for personal, company internal, or commercial purposes;
|
||||
* use ImageMagick software in packages or distributions that you create;
|
||||
* link against a library under a different license;
|
||||
* link code under a different license against a library under this license;
|
||||
* merge code into a work under a different license;
|
||||
* extend patent grants to any code using code under this license;
|
||||
* and extend patent protection.
|
||||
|
||||
It forbids you to:
|
||||
|
||||
* redistribute any piece of ImageMagick-originated software without proper attribution;
|
||||
* use any marks owned by ImageMagick Studio LLC in any way that might state or imply that ImageMagick Studio LLC endorses your distribution;
|
||||
* use any marks owned by ImageMagick Studio LLC in any way that might state or imply that you created the ImageMagick software in question.
|
||||
|
||||
It requires you to:
|
||||
|
||||
* include a copy of the license in any redistribution you may make that includes ImageMagick software;
|
||||
* provide clear attribution to ImageMagick Studio LLC for any distributions that include ImageMagick software.
|
||||
|
||||
It does not require you to:
|
||||
|
||||
* include the source of the ImageMagick software itself, or of any modifications you may have made to it, in any redistribution you may assemble that includes it;
|
||||
* submit changes that you make to the software back to the ImageMagick Studio LLC (though such feedback is encouraged).
|
||||
|
||||
A few other clarifications include:
|
||||
|
||||
* ImageMagick is freely available without charge;
|
||||
* you may include ImageMagick on a DVD as long as you comply with the terms of the license;
|
||||
* you can give modified code away for free or sell it under the terms of the ImageMagick license or distribute the result under a different license, but you need to acknowledge the use of the ImageMagick software;
|
||||
* the license is compatible with the GPL V3.
|
||||
* when exporting the ImageMagick software, review its export classification.
|
||||
|
||||
Terms and Conditions for Use, Reproduction, and Distribution
|
||||
|
||||
The legally binding and authoritative terms and conditions for use, reproduction, and distribution of ImageMagick follow:
|
||||
|
||||
Copyright 1999-2021 ImageMagick Studio LLC, a non-profit organization dedicated to making software imaging solutions freely available.
|
||||
|
||||
1. Definitions.
|
||||
|
||||
License shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
||||
|
||||
Legal Entity shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, control means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
You (or Your) shall mean an individual or Legal Entity exercising permissions granted by this License.
|
||||
|
||||
Source form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
||||
|
||||
Object form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
||||
|
||||
Work shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
||||
|
||||
Derivative Works shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
||||
|
||||
Contribution shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as Not a Contribution.
|
||||
|
||||
Contributor shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
||||
|
||||
* You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
||||
* You must cause any modified files to carry prominent notices stating that You changed the files; and
|
||||
* You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
||||
* If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
||||
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
||||
|
||||
How to Apply the License to your Work
|
||||
|
||||
To apply the ImageMagick License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information (don't include the brackets). The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the ImageMagick License (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy
|
||||
of the License at
|
||||
|
||||
https://imagemagick.org/script/license.php
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
License for the specific language governing permissions and limitations
|
||||
under the License.
|
BIN
engines/imagemagick/src/main/resources/probe.jpg
Normal file
BIN
engines/imagemagick/src/main/resources/probe.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Transform Core
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* -
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* -
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.transform.imagemagick;
|
||||
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_JPEG;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_PNG;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.alfresco.transform.client.model.TransformRequest;
|
||||
import org.alfresco.transform.base.messaging.AbstractQueueIT;
|
||||
|
||||
/**
|
||||
* @author Lucian Tuca
|
||||
* created on 15/01/2019
|
||||
*/
|
||||
public class ImageMagickQueueIT extends AbstractQueueIT
|
||||
{
|
||||
@Override
|
||||
protected TransformRequest buildRequest()
|
||||
{
|
||||
return TransformRequest
|
||||
.builder()
|
||||
.withRequestId(UUID.randomUUID().toString())
|
||||
.withSourceMediaType(MIMETYPE_IMAGE_PNG)
|
||||
.withTargetMediaType(MIMETYPE_IMAGE_JPEG)
|
||||
.withTargetExtension("jpeg")
|
||||
.withSchema(1)
|
||||
.withClientData("ACS")
|
||||
.withSourceReference(UUID.randomUUID().toString())
|
||||
.withSourceSize(32L)
|
||||
.withInternalContextForTransformEngineTests()
|
||||
.build();
|
||||
}
|
||||
}
|
@@ -0,0 +1,406 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Transform Core
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* -
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* -
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.transform.imagemagick;
|
||||
|
||||
import org.alfresco.transform.base.AbstractBaseTest;
|
||||
import org.alfresco.transform.base.executors.RuntimeExec;
|
||||
import org.alfresco.transform.base.executors.RuntimeExec.ExecutionResult;
|
||||
import org.alfresco.transform.base.model.FileRefEntity;
|
||||
import org.alfresco.transform.base.model.FileRefResponse;
|
||||
import org.alfresco.transform.client.model.TransformReply;
|
||||
import org.alfresco.transform.client.model.TransformRequest;
|
||||
import org.alfresco.transform.imagemagick.transformers.ImageMagickTransformer;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.ValueSource;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.stubbing.Answer;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.core.io.FileSystemResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;
|
||||
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import static org.alfresco.transform.common.RequestParamMap.ENDPOINT_TRANSFORM;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.anyLong;
|
||||
import static org.mockito.Mockito.when;
|
||||
import static org.springframework.http.HttpHeaders.ACCEPT;
|
||||
import static org.springframework.http.HttpHeaders.CONTENT_DISPOSITION;
|
||||
import static org.springframework.http.HttpHeaders.CONTENT_TYPE;
|
||||
import static org.springframework.http.HttpStatus.BAD_REQUEST;
|
||||
import static org.springframework.http.HttpStatus.CREATED;
|
||||
import static org.springframework.http.HttpStatus.OK;
|
||||
import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
|
||||
import static org.springframework.http.MediaType.IMAGE_PNG_VALUE;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
import static org.springframework.util.StringUtils.getFilenameExtension;
|
||||
|
||||
/**
|
||||
* Test ImageMagick with mocked external command.
|
||||
*/
|
||||
public class ImageMagickTest extends AbstractBaseTest
|
||||
{
|
||||
private static String PREFIX_IMAGE = "image/";
|
||||
|
||||
@Autowired
|
||||
private ImageMagickTransformer imageMagickTransformer;
|
||||
|
||||
@Mock
|
||||
protected ExecutionResult mockExecutionResult;
|
||||
@Mock
|
||||
protected RuntimeExec mockTransformCommand;
|
||||
@Mock
|
||||
protected RuntimeExec mockCheckCommand;
|
||||
@Value("${transform.core.imagemagick.exe}")
|
||||
protected String EXE;
|
||||
@Value("${transform.core.imagemagick.dyn}")
|
||||
protected String DYN;
|
||||
@Value("${transform.core.imagemagick.root}")
|
||||
protected String ROOT;
|
||||
@Value("${transform.core.imagemagick.coders}")
|
||||
protected String CODERS;
|
||||
@Value("${transform.core.imagemagick.config}")
|
||||
protected String CONFIG;
|
||||
|
||||
@BeforeEach
|
||||
public void before() throws IOException
|
||||
{
|
||||
setMockExternalCommandsOnTransformer(imageMagickTransformer, mockTransformCommand, mockCheckCommand);
|
||||
mockTransformCommand("jpg", "png", "image/jpeg", true);
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
public void after()
|
||||
{
|
||||
resetExternalCommandsOnTransformer();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MockHttpServletRequestBuilder mockMvcRequest(String url, MockMultipartFile sourceFile, String... params)
|
||||
{
|
||||
final MockHttpServletRequestBuilder builder = super.mockMvcRequest(url, sourceFile, params)
|
||||
.param("targetMimetype", targetMimetype)
|
||||
.param("sourceMimetype", sourceMimetype);
|
||||
return builder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mockTransformCommand(String sourceExtension,
|
||||
String targetExtension, String sourceMimetype,
|
||||
boolean readTargetFileBytes) throws IOException
|
||||
{
|
||||
this.sourceExtension = sourceExtension;
|
||||
this.targetExtension = targetExtension;
|
||||
this.sourceMimetype = sourceMimetype;
|
||||
this.targetMimetype = PREFIX_IMAGE + ("jpg".equals(targetExtension) ? "jpeg" : targetExtension);
|
||||
|
||||
expectedOptions = null;
|
||||
expectedSourceSuffix = null;
|
||||
sourceFileBytes = readTestFile(sourceExtension);
|
||||
expectedTargetFileBytes = readTargetFileBytes ? readTestFile(targetExtension) : null;
|
||||
sourceFile = new MockMultipartFile("file", "quick." + sourceExtension, sourceMimetype, sourceFileBytes);
|
||||
|
||||
when(mockTransformCommand.execute(any(), anyLong())).thenAnswer(
|
||||
(Answer<RuntimeExec.ExecutionResult>) invocation -> {
|
||||
Map<String, String> actualProperties = invocation.getArgument(0);
|
||||
assertEquals(3, actualProperties.size(), "There should be 3 properties");
|
||||
|
||||
String actualOptions = actualProperties.get("options");
|
||||
String actualSource = actualProperties.get("source");
|
||||
String actualTarget = actualProperties.get("target");
|
||||
String actualTargetExtension = getFilenameExtension(actualTarget);
|
||||
|
||||
assertNotNull(actualSource);
|
||||
assertNotNull(actualTarget);
|
||||
if (expectedSourceSuffix != null)
|
||||
{
|
||||
assertTrue(actualSource.endsWith(expectedSourceSuffix),
|
||||
"The source file \"" + actualSource + "\" should have ended in \"" + expectedSourceSuffix + "\"");
|
||||
actualSource = actualSource.substring(0, actualSource.length() - expectedSourceSuffix.length());
|
||||
}
|
||||
|
||||
assertNotNull(actualOptions);
|
||||
if (expectedOptions != null)
|
||||
{
|
||||
assertEquals(expectedOptions, actualOptions,"expectedOptions");
|
||||
}
|
||||
|
||||
Long actualTimeout = invocation.getArgument(1);
|
||||
assertNotNull(actualTimeout);
|
||||
if (expectedTimeout != null)
|
||||
{
|
||||
assertEquals(expectedTimeout, actualTimeout,"expectedTimeout");
|
||||
}
|
||||
|
||||
// Copy a test file into the target file location if it exists
|
||||
int i = actualTarget.lastIndexOf('_');
|
||||
if (i >= 0)
|
||||
{
|
||||
String testFilename = actualTarget.substring(i + 1);
|
||||
File testFile = getTestFile(testFilename, false);
|
||||
File targetFile = new File(actualTarget);
|
||||
generateTargetFileFromResourceFile(actualTargetExtension, testFile,
|
||||
targetFile);
|
||||
}
|
||||
|
||||
// Check the supplied source file has not been changed.
|
||||
byte[] actualSourceFileBytes = Files.readAllBytes(new File(actualSource).toPath());
|
||||
assertTrue(Arrays.equals(sourceFileBytes, actualSourceFileBytes),
|
||||
"Source file is not the same");
|
||||
|
||||
return mockExecutionResult;
|
||||
});
|
||||
|
||||
when(mockExecutionResult.getExitValue()).thenReturn(0);
|
||||
when(mockExecutionResult.getStdErr()).thenReturn("STDERROR");
|
||||
when(mockExecutionResult.getStdOut()).thenReturn("STDOUT");
|
||||
}
|
||||
|
||||
@ParameterizedTest
|
||||
@ValueSource(strings = {"North", "NorthEast", "East", "SouthEast", "South", "SouthWest", "West", "NorthWest", "Center"})
|
||||
public void cropGravityGoodTest(String value) throws Exception
|
||||
{
|
||||
expectedOptions = "-auto-orient " + "-gravity " + value + " +repage";
|
||||
mockMvc
|
||||
.perform(MockMvcRequestBuilders
|
||||
.multipart(ENDPOINT_TRANSFORM)
|
||||
.file(sourceFile)
|
||||
.param("targetExtension", targetExtension)
|
||||
.param("targetMimetype", targetMimetype)
|
||||
.param("sourceMimetype", sourceMimetype)
|
||||
.param("cropGravity", value))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(content().bytes(expectedTargetFileBytes))
|
||||
.andExpect(header().string("Content-Disposition",
|
||||
"attachment; filename*=UTF-8''transform." + targetExtension));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void cropGravityBadTest() throws Exception
|
||||
{
|
||||
mockMvc
|
||||
.perform(MockMvcRequestBuilders
|
||||
.multipart(ENDPOINT_TRANSFORM)
|
||||
.file(sourceFile)
|
||||
.param("targetExtension", targetExtension)
|
||||
.param("targetMimetype", targetMimetype)
|
||||
.param("sourceMimetype", sourceMimetype)
|
||||
.param("cropGravity", "badValue"))
|
||||
.andExpect(status().is(BAD_REQUEST.value()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void optionsTest() throws Exception
|
||||
{
|
||||
expectedOptions = "-alpha remove -gravity SouthEast -crop 123x456%+90+12 +repage -thumbnail 321x654%!";
|
||||
expectedSourceSuffix = "[2-3]";
|
||||
mockMvc
|
||||
.perform(MockMvcRequestBuilders
|
||||
.multipart(ENDPOINT_TRANSFORM)
|
||||
.file(sourceFile)
|
||||
.param("targetExtension", targetExtension)
|
||||
.param("targetMimetype", targetMimetype)
|
||||
.param("sourceMimetype", sourceMimetype)
|
||||
|
||||
.param("startPage", "2")
|
||||
.param("endPage", "3")
|
||||
|
||||
.param("alphaRemove", "true")
|
||||
.param("autoOrient", "false")
|
||||
|
||||
.param("cropGravity", "SouthEast")
|
||||
.param("cropWidth", "123")
|
||||
.param("cropHeight", "456")
|
||||
.param("cropPercentage", "true")
|
||||
.param("cropXOffset", "90")
|
||||
.param("cropYOffset", "12")
|
||||
|
||||
.param("thumbnail", "true")
|
||||
.param("resizeWidth", "321")
|
||||
.param("resizeHeight", "654")
|
||||
.param("resizePercentage", "true")
|
||||
.param("allowEnlargement", "true")
|
||||
.param("maintainAspectRatio", "false"))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(content().bytes(expectedTargetFileBytes))
|
||||
.andExpect(header().string("Content-Disposition",
|
||||
"attachment; filename*=UTF-8''transform." + targetExtension));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void optionsNegateBooleansTest() throws Exception
|
||||
{
|
||||
expectedOptions = "-auto-orient -gravity SouthEast -crop 123x456+90+12 +repage -resize 321x654>";
|
||||
expectedSourceSuffix = "[2-3]";
|
||||
mockMvc
|
||||
.perform(MockMvcRequestBuilders
|
||||
.multipart(ENDPOINT_TRANSFORM)
|
||||
.file(sourceFile)
|
||||
.param("targetExtension", targetExtension)
|
||||
.param("targetMimetype", targetMimetype)
|
||||
.param("sourceMimetype", sourceMimetype)
|
||||
|
||||
.param("startPage", "2")
|
||||
.param("endPage", "3")
|
||||
|
||||
.param("alphaRemove", "false")
|
||||
.param("autoOrient", "true")
|
||||
|
||||
.param("cropGravity", "SouthEast")
|
||||
.param("cropWidth", "123")
|
||||
.param("cropHeight", "456")
|
||||
.param("cropPercentage", "false")
|
||||
.param("cropXOffset", "90")
|
||||
.param("cropYOffset", "12")
|
||||
|
||||
.param("thumbnail", "false")
|
||||
.param("resizeWidth", "321")
|
||||
.param("resizeHeight", "654")
|
||||
.param("resizePercentage", "false")
|
||||
.param("allowEnlargement", "false")
|
||||
.param("maintainAspectRatio", "true"))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(content().bytes(expectedTargetFileBytes))
|
||||
.andExpect(header().string("Content-Disposition",
|
||||
"attachment; filename*=UTF-8''transform." + targetExtension));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void deprecatedCommandOptionsTest() throws Exception
|
||||
{
|
||||
// Example of why the commandOptions parameter is a bad idea.
|
||||
expectedOptions = "( horrible command / ); -auto-orient -resize 321x654";
|
||||
mockMvc
|
||||
.perform(MockMvcRequestBuilders
|
||||
.multipart(ENDPOINT_TRANSFORM)
|
||||
.file(sourceFile)
|
||||
.param("targetExtension", targetExtension)
|
||||
.param("targetMimetype", targetMimetype)
|
||||
.param("sourceMimetype", sourceMimetype)
|
||||
.param("thumbnail", "false")
|
||||
.param("resizeWidth", "321")
|
||||
.param("resizeHeight", "654")
|
||||
.param("commandOptions", "( horrible command / );"))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(content().bytes(expectedTargetFileBytes))
|
||||
.andExpect(header().string("Content-Disposition",
|
||||
"attachment; filename*=UTF-8''transform." + targetExtension));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateTransformRequestWithSpecificOptions(TransformRequest transformRequest)
|
||||
{
|
||||
transformRequest.setSourceExtension("png");
|
||||
transformRequest.setTargetExtension("png");
|
||||
transformRequest.setSourceMediaType(IMAGE_PNG_VALUE);
|
||||
transformRequest.setTargetMediaType(IMAGE_PNG_VALUE);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void badExitCodeTest() throws Exception
|
||||
{
|
||||
when(mockExecutionResult.getExitValue()).thenReturn(1);
|
||||
|
||||
mockMvc.perform(mockMvcRequest(ENDPOINT_TRANSFORM, sourceFile, "targetExtension", "xxx"))
|
||||
.andExpect(status().is(BAD_REQUEST.value()))
|
||||
.andExpect(status()
|
||||
.reason(containsString("Transformer exit code was not 0: \nSTDERR")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPojoTransform() throws Exception
|
||||
{
|
||||
// Files
|
||||
String sourceFileRef = UUID.randomUUID().toString();
|
||||
File sourceFile = getTestFile("quick." + sourceExtension, true);
|
||||
String targetFileRef = UUID.randomUUID().toString();
|
||||
|
||||
TransformRequest transformRequest = createTransformRequest(sourceFileRef, sourceFile);
|
||||
|
||||
// HTTP Request
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.set(CONTENT_DISPOSITION, "attachment; filename=quick." + sourceExtension);
|
||||
ResponseEntity<Resource> response = new ResponseEntity<>(new FileSystemResource(
|
||||
sourceFile), headers, OK);
|
||||
|
||||
when(sharedFileStoreClient.retrieveFile(sourceFileRef)).thenReturn(response);
|
||||
when(sharedFileStoreClient.saveFile(any()))
|
||||
.thenReturn(new FileRefResponse(new FileRefEntity(targetFileRef)));
|
||||
when(mockExecutionResult.getExitValue()).thenReturn(0);
|
||||
|
||||
// Update the Transformation Request with any specific params before sending it
|
||||
updateTransformRequestWithSpecificOptions(transformRequest);
|
||||
|
||||
// Serialize and call the transformer
|
||||
String tr = objectMapper.writeValueAsString(transformRequest);
|
||||
String transformationReplyAsString = mockMvc
|
||||
.perform(MockMvcRequestBuilders
|
||||
.post(ENDPOINT_TRANSFORM)
|
||||
.header(ACCEPT, APPLICATION_JSON_VALUE)
|
||||
.header(CONTENT_TYPE, APPLICATION_JSON_VALUE)
|
||||
.content(tr))
|
||||
.andExpect(status().is(CREATED.value()))
|
||||
.andReturn().getResponse().getContentAsString();
|
||||
|
||||
TransformReply transformReply = objectMapper.readValue(transformationReplyAsString,
|
||||
TransformReply.class);
|
||||
|
||||
// Assert the reply
|
||||
assertEquals(transformRequest.getRequestId(), transformReply.getRequestId());
|
||||
assertEquals(transformRequest.getClientData(), transformReply.getClientData());
|
||||
assertEquals(transformRequest.getSchema(), transformReply.getSchema());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOverridingExecutorPaths()
|
||||
{
|
||||
//System test property values can me modified in the pom.xml
|
||||
assertEquals(EXE, System.getProperty("IMAGEMAGICK_EXE"));
|
||||
assertEquals(DYN, System.getProperty("IMAGEMAGICK_DYN"));
|
||||
assertEquals(ROOT, System.getProperty("IMAGEMAGICK_ROOT"));
|
||||
}
|
||||
}
|
@@ -0,0 +1,238 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Transform Core
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* -
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
* -
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* -
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
* -
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.transform.imagemagick;
|
||||
|
||||
import static java.text.MessageFormat.format;
|
||||
import static java.util.Collections.emptyMap;
|
||||
import static java.util.function.Function.identity;
|
||||
import static java.util.stream.Collectors.toMap;
|
||||
import static org.alfresco.transform.base.clients.HttpClient.sendTRequest;
|
||||
import static org.alfresco.transform.base.clients.FileInfo.testFile;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_BMP;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_CGM;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_GIF;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_IEF;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_JP2;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_JPEG;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_PBM;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_PGM;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_PNG;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_PNM;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_PPJ;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_PPM;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_PSD;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_RAS;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_RAW_3FR;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_RAW_ARW;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_RAW_CR2;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_RAW_DNG;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_RAW_K25;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_RAW_MRW;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_RAW_NEF;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_RAW_ORF;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_RAW_PEF;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_RAW_R3D;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_RAW_RAF;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_RAW_RW2;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_RAW_RWL;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_RAW_X3F;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_TIFF;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_XBM;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_XPM;
|
||||
import static org.alfresco.transform.common.Mimetype.MIMETYPE_IMAGE_XWD;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
import static org.springframework.http.HttpStatus.OK;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import org.alfresco.transform.base.clients.FileInfo;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
/**
|
||||
* @author Cezar Leahu
|
||||
*/
|
||||
public class ImageMagickTransformationIT {
|
||||
private static final Logger logger = LoggerFactory.getLogger(ImageMagickTransformationIT.class);
|
||||
private static final String ENGINE_URL = "http://localhost:8090";
|
||||
private static final List<Pair<String, String>> targetExtensions = new ImmutableList.Builder<Pair<String, String>>()
|
||||
.add(Pair.of("3fr", MIMETYPE_IMAGE_RAW_3FR))
|
||||
.add(Pair.of("arw", MIMETYPE_IMAGE_RAW_ARW))
|
||||
.add(Pair.of("bmp", MIMETYPE_IMAGE_BMP))
|
||||
.add(Pair.of("cgm", MIMETYPE_IMAGE_CGM))
|
||||
.add(Pair.of("cr2", MIMETYPE_IMAGE_RAW_CR2))
|
||||
.add(Pair.of("dng", MIMETYPE_IMAGE_RAW_DNG))
|
||||
.add(Pair.of("gif", MIMETYPE_IMAGE_GIF))
|
||||
.add(Pair.of("ief", MIMETYPE_IMAGE_IEF))
|
||||
.add(Pair.of("jp2", MIMETYPE_IMAGE_JP2))
|
||||
.add(Pair.of("jpg", MIMETYPE_IMAGE_JPEG))
|
||||
.add(Pair.of("k25", MIMETYPE_IMAGE_RAW_K25))
|
||||
.add(Pair.of("mrw", MIMETYPE_IMAGE_RAW_MRW))
|
||||
.add(Pair.of("nef", MIMETYPE_IMAGE_RAW_NEF))
|
||||
.add(Pair.of("orf", MIMETYPE_IMAGE_RAW_ORF))
|
||||
.add(Pair.of("pbm", MIMETYPE_IMAGE_PBM))
|
||||
.add(Pair.of("pef", MIMETYPE_IMAGE_RAW_PEF))
|
||||
.add(Pair.of("pgm", MIMETYPE_IMAGE_PGM))
|
||||
.add(Pair.of("png", MIMETYPE_IMAGE_PNG))
|
||||
.add(Pair.of("pnm", MIMETYPE_IMAGE_PNM))
|
||||
.add(Pair.of("ppj", MIMETYPE_IMAGE_PPJ))
|
||||
.add(Pair.of("ppm", MIMETYPE_IMAGE_PPM))
|
||||
.add(Pair.of("r3d", MIMETYPE_IMAGE_RAW_R3D))
|
||||
.add(Pair.of("raf", MIMETYPE_IMAGE_RAW_RAF))
|
||||
.add(Pair.of("ras", MIMETYPE_IMAGE_RAS))
|
||||
.add(Pair.of("rw2", MIMETYPE_IMAGE_RAW_RW2))
|
||||
.add(Pair.of("rwl", MIMETYPE_IMAGE_RAW_RWL))
|
||||
.add(Pair.of("tiff", MIMETYPE_IMAGE_TIFF))
|
||||
.add(Pair.of("x3f", MIMETYPE_IMAGE_RAW_X3F))
|
||||
.add(Pair.of("xbm", MIMETYPE_IMAGE_XBM))
|
||||
.add(Pair.of("xpm", MIMETYPE_IMAGE_XPM))
|
||||
.add(Pair.of("xwd", MIMETYPE_IMAGE_XWD))
|
||||
.build();
|
||||
|
||||
private static final List<Pair<String, String>> targetExtensionsForPSD = new ImmutableList.Builder<Pair<String, String>>()
|
||||
.add(Pair.of("x3f", MIMETYPE_IMAGE_RAW_X3F))
|
||||
.add(Pair.of("tiff", MIMETYPE_IMAGE_TIFF))
|
||||
.add(Pair.of("rwl", MIMETYPE_IMAGE_RAW_RWL))
|
||||
.add(Pair.of("rw2", MIMETYPE_IMAGE_RAW_RW2))
|
||||
.add(Pair.of("ras", MIMETYPE_IMAGE_RAS))
|
||||
.add(Pair.of("raf", MIMETYPE_IMAGE_RAW_RAF))
|
||||
.add(Pair.of("r3d", MIMETYPE_IMAGE_RAW_R3D))
|
||||
.add(Pair.of("psd", MIMETYPE_IMAGE_PSD))
|
||||
.add(Pair.of("ppm", MIMETYPE_IMAGE_PPM))
|
||||
.add(Pair.of("ppj", MIMETYPE_IMAGE_PPJ))
|
||||
.add(Pair.of("pnm", MIMETYPE_IMAGE_PNM))
|
||||
.add(Pair.of("pgm", MIMETYPE_IMAGE_PGM))
|
||||
.add(Pair.of("pef", MIMETYPE_IMAGE_RAW_PEF))
|
||||
.add(Pair.of("pbm", MIMETYPE_IMAGE_PBM))
|
||||
.add(Pair.of("orf", MIMETYPE_IMAGE_RAW_ORF))
|
||||
.add(Pair.of("nef", MIMETYPE_IMAGE_RAW_NEF))
|
||||
.add(Pair.of("mrw", MIMETYPE_IMAGE_RAW_MRW))
|
||||
.add(Pair.of("k25", MIMETYPE_IMAGE_RAW_K25))
|
||||
.add(Pair.of("ief", MIMETYPE_IMAGE_IEF))
|
||||
.add(Pair.of("gif", MIMETYPE_IMAGE_GIF))
|
||||
.add(Pair.of("dng", MIMETYPE_IMAGE_RAW_DNG))
|
||||
.add(Pair.of("cr2", MIMETYPE_IMAGE_RAW_CR2))
|
||||
.add(Pair.of("arw", MIMETYPE_IMAGE_RAW_ARW))
|
||||
.add(Pair.of("3fr", MIMETYPE_IMAGE_RAW_3FR))
|
||||
.build();
|
||||
|
||||
private static final List<Pair<String, String>> targetExtensionsForTiffFirstPage = new ImmutableList.Builder<Pair<String, String>>()
|
||||
.add(Pair.of("bmp", MIMETYPE_IMAGE_BMP))
|
||||
.add(Pair.of("jp2", MIMETYPE_IMAGE_JP2))
|
||||
.add(Pair.of("jpg", MIMETYPE_IMAGE_JPEG))
|
||||
.add(Pair.of("png", MIMETYPE_IMAGE_PNG))
|
||||
.add(Pair.of("xbm", MIMETYPE_IMAGE_XBM))
|
||||
.add(Pair.of("xpm", MIMETYPE_IMAGE_XPM))
|
||||
.add(Pair.of("xwd", MIMETYPE_IMAGE_XWD))
|
||||
.build();
|
||||
|
||||
private static final Map<String, FileInfo> TEST_FILES = Stream.of(
|
||||
testFile(MIMETYPE_IMAGE_BMP, "bmp", "quick.bmp"),
|
||||
testFile(MIMETYPE_IMAGE_GIF, "gif", "quick.gif"),
|
||||
testFile(MIMETYPE_IMAGE_JPEG, "jpg", "quick.jpg"),
|
||||
testFile(MIMETYPE_IMAGE_PBM, "pbm", "quick.pbm"),
|
||||
testFile(MIMETYPE_IMAGE_PGM, "pgm", "quick.pgm"),
|
||||
testFile(MIMETYPE_IMAGE_PNG, "png", "quick.png"),
|
||||
testFile(MIMETYPE_IMAGE_PNM, "pnm", "quick.pnm"),
|
||||
testFile(MIMETYPE_IMAGE_PPM, "ppm", "quick.ppm"),
|
||||
testFile(MIMETYPE_IMAGE_XBM, "xbm", "quick.xbm"),
|
||||
testFile(MIMETYPE_IMAGE_XPM, "xpm", "quick.xpm"),
|
||||
testFile(MIMETYPE_IMAGE_PSD, "psd", "quick.psd"),
|
||||
testFile(MIMETYPE_IMAGE_TIFF, "tiff", "quick.tiff"),
|
||||
testFile(MIMETYPE_IMAGE_XWD, "xwd", "quick.xwd")
|
||||
).collect(toMap(FileInfo::getPath, identity()));
|
||||
|
||||
public static Stream<Pair<FileInfo, Pair<String,String>>> engineTransformations() {
|
||||
return Stream
|
||||
.of(
|
||||
allTargets("quick.bmp", targetExtensions),
|
||||
allTargets("quick.gif", targetExtensions),
|
||||
allTargets("quick.jpg", targetExtensions),
|
||||
allTargets("quick.pbm", targetExtensions),
|
||||
allTargets("quick.pgm", targetExtensions),
|
||||
allTargets("quick.png", targetExtensions),
|
||||
allTargets("quick.pnm", targetExtensions),
|
||||
allTargets("quick.ppm", targetExtensions),
|
||||
allTargets("quick.psd", targetExtensionsForPSD),
|
||||
allTargets("quick.tiff", targetExtensions),
|
||||
allTargets("quick.xbm", targetExtensions),
|
||||
allTargets("quick.xpm", targetExtensions),
|
||||
allTargets("quick.xwd", targetExtensions)
|
||||
).flatMap(identity());
|
||||
}
|
||||
|
||||
@ParameterizedTest
|
||||
@MethodSource("engineTransformations")
|
||||
public void testTransformation(Pair<FileInfo, Pair<String, String>> entry)
|
||||
{
|
||||
String sourceFile = entry.getLeft().getPath();
|
||||
String targetExtension = entry.getRight().getLeft();
|
||||
String sourceMimetype = entry.getLeft().getMimeType();
|
||||
String targetMimetype = entry.getRight().getRight();
|
||||
|
||||
final String descriptor = format("Transform ({0}, {1} -> {2}, {3})",
|
||||
sourceFile, sourceMimetype, targetMimetype, targetExtension);
|
||||
try
|
||||
{
|
||||
// note: some image/tiff->image/* will return multiple page results (hence error) unless options specified for single page
|
||||
Map<String, String> tOptions = emptyMap();
|
||||
Pair<String,String> targetPair = Pair.of(targetExtension, targetMimetype);
|
||||
if (MIMETYPE_IMAGE_TIFF.equals(sourceMimetype) && targetExtensionsForTiffFirstPage.contains(targetPair))
|
||||
{
|
||||
tOptions = ImmutableMap.of("startPage", "0", "endPage", "0");
|
||||
}
|
||||
|
||||
final ResponseEntity<Resource> response = sendTRequest(ENGINE_URL, sourceFile, sourceMimetype,
|
||||
targetMimetype, targetExtension, tOptions);
|
||||
assertEquals(OK, response.getStatusCode(), descriptor);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
fail(descriptor + " exception: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private static Stream<Pair<FileInfo, Pair<String,String>>> allTargets(final String sourceFile, List<Pair<String,String>> targetExtensionsList)
|
||||
{
|
||||
return targetExtensionsList
|
||||
.stream()
|
||||
.map(k -> Pair.of(TEST_FILES.get(sourceFile), k));
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"transformOptions": {
|
||||
"engineXOptions": [
|
||||
{"value": {"name": "page"}},
|
||||
{"value": {"name": "width"}},
|
||||
{"group": {"transformOptions": [
|
||||
{"value": {"name": "cropGravity"}}
|
||||
]}}
|
||||
]
|
||||
},
|
||||
"transformers": [
|
||||
{
|
||||
"transformerName": "engineX",
|
||||
"supportedSourceAndTargetList": [
|
||||
{"sourceMediaType": "application/pdf", "targetMediaType": "image/png" }
|
||||
],
|
||||
"transformOptions": [
|
||||
"engineXOptions"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"transformOptions": {},
|
||||
"transformers": [
|
||||
{
|
||||
"supportedSourceAndTargetList": [
|
||||
{"sourceMediaType": "application/pdf", "targetMediaType": "image/png" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"transformers": [
|
||||
{
|
||||
"transformerName": "engineX",
|
||||
"supportedSourceAndTargetList": [
|
||||
{"sourceMediaType": "application/pdf", "targetMediaType": "image/png" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"transformOptions": {
|
||||
"engineXOptions": [
|
||||
{"value": {"name": "page"}},
|
||||
{"value": {"name": "page"}},
|
||||
{"value": {"name": "width"}},
|
||||
{"group": {"transformOptions": [
|
||||
{"value": {"name": "cropGravity"}}
|
||||
]}}
|
||||
]
|
||||
},
|
||||
"transformers": [
|
||||
{
|
||||
"transformerName": "engineX",
|
||||
"supportedSourceAndTargetList": [
|
||||
{"sourceMediaType": "application/pdf", "targetMediaType": "image/png" },
|
||||
{"sourceMediaType": "application/pdf", "targetMediaType": "image/png" },
|
||||
{"sourceMediaType": "application/pdf", "targetMediaType": "image/png" }
|
||||
],
|
||||
"transformOptions": [
|
||||
"engineXOptions",
|
||||
"engineXOptions"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
BIN
engines/imagemagick/src/test/resources/quick.bmp
Normal file
BIN
engines/imagemagick/src/test/resources/quick.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 297 KiB |
BIN
engines/imagemagick/src/test/resources/quick.gif
Normal file
BIN
engines/imagemagick/src/test/resources/quick.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.0 KiB |
BIN
engines/imagemagick/src/test/resources/quick.jpg
Normal file
BIN
engines/imagemagick/src/test/resources/quick.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
BIN
engines/imagemagick/src/test/resources/quick.pbm
Normal file
BIN
engines/imagemagick/src/test/resources/quick.pbm
Normal file
Binary file not shown.
5
engines/imagemagick/src/test/resources/quick.pgm
Normal file
5
engines/imagemagick/src/test/resources/quick.pgm
Normal file
File diff suppressed because one or more lines are too long
BIN
engines/imagemagick/src/test/resources/quick.png
Normal file
BIN
engines/imagemagick/src/test/resources/quick.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.1 KiB |
5
engines/imagemagick/src/test/resources/quick.pnm
Normal file
5
engines/imagemagick/src/test/resources/quick.pnm
Normal file
File diff suppressed because one or more lines are too long
5
engines/imagemagick/src/test/resources/quick.ppm
Normal file
5
engines/imagemagick/src/test/resources/quick.ppm
Normal file
File diff suppressed because one or more lines are too long
BIN
engines/imagemagick/src/test/resources/quick.psd
Normal file
BIN
engines/imagemagick/src/test/resources/quick.psd
Normal file
Binary file not shown.
BIN
engines/imagemagick/src/test/resources/quick.tiff
Normal file
BIN
engines/imagemagick/src/test/resources/quick.tiff
Normal file
Binary file not shown.
1587
engines/imagemagick/src/test/resources/quick.xbm
Normal file
1587
engines/imagemagick/src/test/resources/quick.xbm
Normal file
File diff suppressed because it is too large
Load Diff
201
engines/imagemagick/src/test/resources/quick.xpm
Normal file
201
engines/imagemagick/src/test/resources/quick.xpm
Normal file
@@ -0,0 +1,201 @@
|
||||
/* XPM */
|
||||
static char * D:\NewQuickImages\quick_xpm[] = {
|
||||
"800 190 8 1",
|
||||
" c None",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
"@ c #FF0000",
|
||||
"# c #0000FF",
|
||||
"$ c #00FF00",
|
||||
"% c #FFFF00",
|
||||
"& c #00FFFF",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"...............................++.......................................................................++.................++.....................................................................++++................................................................................................................................................................++..............................++....................................................++..................................................................................................................................................................................................................................................................................................................................................................",
|
||||
".................++++++++++++..++.......................................................++..............++.................++....................................................................+++++.................................++.............................................................................................................................++..............................++....................................................++..................................................................................................................................................................................................................................................................................................................................................................",
|
||||
".................++++++++++++..++.......................................................++..............++.................++...................................................................+++....................................++.....................................................................................................................++......++..............................++....................................................++..................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"......................++.......++.......................................................................++.................++...................................................................++............................................................................................................................................................++......++..............................++....................................................++..................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"......................++.......++.......................................................................++.................++...................................................................++............................................................................................................................................................++......++..............................++....................................................++..................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"......................++.......++.++++........+++++.............+++++++....++.....++....++......++++....++.....++..........++.++++.....++..+++....++++.....++....++....++...++.++++............++++++....++++.....+++....+++.........++++....++.....++....++.++++...++++.....++.++++......+++++.............++++.....++......++.....+++++.....++..+++........+++++++..++.++++........+++++............++....++++++.....+++++++++..++......++...........+++++++......++++.......+++++++..........................................................................................................................................................................................................................................................................................................................................",
|
||||
"......................++.......++++++++.....++++++++...........++++++++....++.....++....++....+++++++...++....++...........++++++++....+++++++..++++++++...++....++....++...++++++++...........++++++..++++++++....++....++..........++++....++.....++....++++++++.++++++....++++++++....+++++++..........++++++++....++....++....++++++++....+++++++........+++++++..++++++++.....++++++++...........++....+++++++....+++++++++...++....++...........++++++++....++++++++....++++++++..........................................................................................................................................................................................................................................................................................................................................",
|
||||
"......................++.......+++...+++....++....+++..........++....++....++.....++....++....++....+...++...++............+++...+++...+++......++....++....++...+++..++....+++...+++...........++.....++....++.....++..++.............++....++.....++....+++...++++...+++...+++...+++..++.....+..........++....++....++....++....++....+++...+++.............++......+++...+++....++....+++..........++.........+++.........+++...++....++...........++....++....++....++....++....++..........................................................................................................................................................................................................................................................................................................................................",
|
||||
"......................++.......++.....++...++......++.........++.....++....++.....++....++...++.........++..++.............++.....++...++......++......++...++..++++..++....++.....++...........++....++......++.....++++..............++....++.....++....++.....++.....++...++.....++..++...............++......++...++....++...++......++...++..............++......++.....++...++......++..........++..........++........+++....++....++..........++.....++...++......++..++.....++..........................................................................................................................................................................................................................................................................................................................................",
|
||||
"......................++.......++.....++...++++++++++.........++.....++....++.....++....++...++.........++.++..............++.....++...++......++......++...++..+..+..++....++.....++...........++....++......++.....++++..............++....++.....++....++.....++.....++...++.....++..++++.............++......++....++..++....++++++++++...++..............++......++.....++...++++++++++..........++......++++++.......+++......++..++...........++.....++...++......++..++.....++..........................................................................................................................................................................................................................................................................................................................................",
|
||||
"......................++.......++.....++...++++++++++.........++.....++....++.....++....++...++.........+++++..............++.....++...++......++......++...++..+..+..++....++.....++...........++....++......++......++...............++....++.....++....++.....++.....++...++.....++...++++++..........++......++....++..++....++++++++++...++..............++......++.....++...++++++++++..........++....++++++++......+++.......++..++...........++.....++...++......++..++.....++..........................................................................................................................................................................................................................................................................................................................................",
|
||||
"......................++.......++.....++...++.................++.....++....++.....++....++...++.........++++++.............++.....++...++......++......++....+.++..++.+.....++.....++...........++....++......++.....++++..............++....++.....++....++.....++.....++...++.....++......++++.........++......++....++..++....++...........++..............++......++.....++...++..................++...+++....++.....+++.........+..+............++.....++...++......++..++.....++..........................................................................................................................................................................................................................................................................................................................................",
|
||||
"......................++.......++.....++...++.................++.....++....++.....++....++...++.........++..+++............++.....++...++......++......++....+++....+.+.....++.....++...........++....++......++.....++++..............++....++.....++....++.....++.....++...++.....++........++.........++......++.....++++.....++...........++..............++......++.....++...++..................++...++.....++....+++..........++++............++.....++...++......++..++.....++..........................................................................................................................................................................................................................................................................................................................................",
|
||||
"......................++.......++.....++....+++.....+.........+++...+++....+++...+++....++....++....+...++...+++...........++....++....++.......++....++.....+++....+++.....++.....++...........++.....++....++.....++..++.............++....+++...+++....++.....++.....++...++....++...+.....++..........++....++......++++......+++.....+...++..............++......++.....++....+++.....+..........++...++....+++...+++...........++++............+++...+++....++....++...+++...+++....++....................................................................................................................................................................................................................................................................................................................................",
|
||||
"......................++.......++.....++....+++++++++..........++++++++.....++++++++....++....+++++++...++....+++..........++++++++....++.......++++++++.....+++....+++.....++.....++...........++.....++++++++....++....++............++.....++++++++....++.....++.....++...++++++++...+++++++...........++++++++.......++.......+++++++++...++..............++++++..++.....++....+++++++++..........++...+++++++++...+++++++++......++..............++++++++....++++++++....++++++++....++....................................................................................................................................................................................................................................................................................................................................",
|
||||
"......................++.......++.....++......++++++............++++.++......++++.++....++.....+++++....++.....+++.........++.++++.....++.........++++........++.....+......++.....++...........++.......++++.....+++....+++...........++......++++.++....++.....++.....++...+++++++.....+++++..............++++.........++.........++++++....++...............+++++..++.....++......++++++...........++....+++++.++...+++++++++......++...............++++.++......++++.......++++.++....++....................................................................................................................................................................................................................................................................................................................................",
|
||||
".....................................................................++................................................................................................................................................................++....................................++.......................................................................................................................................................+.............................................++..........................................................................................................................................................................................................................................................................................................................................",
|
||||
".....................................................................++...............................................................................................................................................................+++....................................++......................................................................................................................................................++............................................+++..........................................................................................................................................................................................................................................................................................................................................",
|
||||
".....................................................................++............................................................................................................................................................+++++.....................................++......................................................................................................................................................++.......................................+++++++...........................................................................................................................................................................................................................................................................................................................................",
|
||||
".....................................................................++............................................................................................................................................................++++......................................++.....................................................................................................................................................++........................................++++++............................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
".......................................................................................@@.......................................................................@@.................@@.....................................................................@@@@................................................................................................................................................................@@..............................@@....................................................@@..........................................................................................................................................................................................................................................................................................................",
|
||||
".........................................................................@@@@@@@@@@@@..@@.......................................................@@..............@@.................@@....................................................................@@@@@.................................@@.............................................................................................................................@@..............................@@....................................................@@..........................................................................................................................................................................................................................................................................................................",
|
||||
".........................................................................@@@@@@@@@@@@..@@.......................................................@@..............@@.................@@...................................................................@@@....................................@@.....................................................................................................................@@......@@..............................@@....................................................@@..........................................................................................................................................................................................................................................................................................................",
|
||||
"..............................................................................@@.......@@.......................................................................@@.................@@...................................................................@@............................................................................................................................................................@@......@@..............................@@....................................................@@..........................................................................................................................................................................................................................................................................................................",
|
||||
"..............................................................................@@.......@@.......................................................................@@.................@@...................................................................@@............................................................................................................................................................@@......@@..............................@@....................................................@@..........................................................................................................................................................................................................................................................................................................",
|
||||
"..............................................................................@@.......@@.@@@@........@@@@@.............@@@@@@@....@@.....@@....@@......@@@@....@@.....@@..........@@.@@@@.....@@..@@@....@@@@.....@@....@@....@@...@@.@@@@............@@@@@@....@@@@.....@@@....@@@.........@@@@....@@.....@@....@@.@@@@...@@@@.....@@.@@@@......@@@@@.............@@@@.....@@......@@.....@@@@@.....@@..@@@........@@@@@@@..@@.@@@@........@@@@@............@@....@@@@@@.....@@@@@@@@@..@@......@@...........@@@@@@@......@@@@.......@@@@@@@..................................................................................................................................................................................................................................................................................",
|
||||
"..............................................................................@@.......@@@@@@@@.....@@@@@@@@...........@@@@@@@@....@@.....@@....@@....@@@@@@@...@@....@@...........@@@@@@@@....@@@@@@@..@@@@@@@@...@@....@@....@@...@@@@@@@@...........@@@@@@..@@@@@@@@....@@....@@..........@@@@....@@.....@@....@@@@@@@@.@@@@@@....@@@@@@@@....@@@@@@@..........@@@@@@@@....@@....@@....@@@@@@@@....@@@@@@@........@@@@@@@..@@@@@@@@.....@@@@@@@@...........@@....@@@@@@@....@@@@@@@@@...@@....@@...........@@@@@@@@....@@@@@@@@....@@@@@@@@..................................................................................................................................................................................................................................................................................",
|
||||
"..............................................................................@@.......@@@...@@@....@@....@@@..........@@....@@....@@.....@@....@@....@@....@...@@...@@............@@@...@@@...@@@......@@....@@....@@...@@@..@@....@@@...@@@...........@@.....@@....@@.....@@..@@.............@@....@@.....@@....@@@...@@@@...@@@...@@@...@@@..@@.....@..........@@....@@....@@....@@....@@....@@@...@@@.............@@......@@@...@@@....@@....@@@..........@@.........@@@.........@@@...@@....@@...........@@....@@....@@....@@....@@....@@..................................................................................................................................................................................................................................................................................",
|
||||
"..............................................................................@@.......@@.....@@...@@......@@.........@@.....@@....@@.....@@....@@...@@.........@@..@@.............@@.....@@...@@......@@......@@...@@..@@@@..@@....@@.....@@...........@@....@@......@@.....@@@@..............@@....@@.....@@....@@.....@@.....@@...@@.....@@..@@...............@@......@@...@@....@@...@@......@@...@@..............@@......@@.....@@...@@......@@..........@@..........@@........@@@....@@....@@..........@@.....@@...@@......@@..@@.....@@..................................................................................................................................................................................................................................................................................",
|
||||
"..............................................................................@@.......@@.....@@...@@@@@@@@@@.........@@.....@@....@@.....@@....@@...@@.........@@.@@..............@@.....@@...@@......@@......@@...@@..@..@..@@....@@.....@@...........@@....@@......@@.....@@@@..............@@....@@.....@@....@@.....@@.....@@...@@.....@@..@@@@.............@@......@@....@@..@@....@@@@@@@@@@...@@..............@@......@@.....@@...@@@@@@@@@@..........@@......@@@@@@.......@@@......@@..@@...........@@.....@@...@@......@@..@@.....@@..................................................................................................................................................................................................................................................................................",
|
||||
"..............................................................................@@.......@@.....@@...@@@@@@@@@@.........@@.....@@....@@.....@@....@@...@@.........@@@@@..............@@.....@@...@@......@@......@@...@@..@..@..@@....@@.....@@...........@@....@@......@@......@@...............@@....@@.....@@....@@.....@@.....@@...@@.....@@...@@@@@@..........@@......@@....@@..@@....@@@@@@@@@@...@@..............@@......@@.....@@...@@@@@@@@@@..........@@....@@@@@@@@......@@@.......@@..@@...........@@.....@@...@@......@@..@@.....@@..................................................................................................................................................................................................................................................................................",
|
||||
"..............................................................................@@.......@@.....@@...@@.................@@.....@@....@@.....@@....@@...@@.........@@@@@@.............@@.....@@...@@......@@......@@....@.@@..@@.@.....@@.....@@...........@@....@@......@@.....@@@@..............@@....@@.....@@....@@.....@@.....@@...@@.....@@......@@@@.........@@......@@....@@..@@....@@...........@@..............@@......@@.....@@...@@..................@@...@@@....@@.....@@@.........@..@............@@.....@@...@@......@@..@@.....@@..................................................................................................................................................................................................................................................................................",
|
||||
"..............................................................................@@.......@@.....@@...@@.................@@.....@@....@@.....@@....@@...@@.........@@..@@@............@@.....@@...@@......@@......@@....@@@....@.@.....@@.....@@...........@@....@@......@@.....@@@@..............@@....@@.....@@....@@.....@@.....@@...@@.....@@........@@.........@@......@@.....@@@@.....@@...........@@..............@@......@@.....@@...@@..................@@...@@.....@@....@@@..........@@@@............@@.....@@...@@......@@..@@.....@@..................................................................................................................................................................................................................................................................................",
|
||||
"..............................................................................@@.......@@.....@@....@@@.....@.........@@@...@@@....@@@...@@@....@@....@@....@...@@...@@@...........@@....@@....@@.......@@....@@.....@@@....@@@.....@@.....@@...........@@.....@@....@@.....@@..@@.............@@....@@@...@@@....@@.....@@.....@@...@@....@@...@.....@@..........@@....@@......@@@@......@@@.....@...@@..............@@......@@.....@@....@@@.....@..........@@...@@....@@@...@@@...........@@@@............@@@...@@@....@@....@@...@@@...@@@....@@............................................................................................................................................................................................................................................................................",
|
||||
"..............................................................................@@.......@@.....@@....@@@@@@@@@..........@@@@@@@@.....@@@@@@@@....@@....@@@@@@@...@@....@@@..........@@@@@@@@....@@.......@@@@@@@@.....@@@....@@@.....@@.....@@...........@@.....@@@@@@@@....@@....@@............@@.....@@@@@@@@....@@.....@@.....@@...@@@@@@@@...@@@@@@@...........@@@@@@@@.......@@.......@@@@@@@@@...@@..............@@@@@@..@@.....@@....@@@@@@@@@..........@@...@@@@@@@@@...@@@@@@@@@......@@..............@@@@@@@@....@@@@@@@@....@@@@@@@@....@@............................................................................................................................................................................................................................................................................",
|
||||
"..............................................................................@@.......@@.....@@......@@@@@@............@@@@.@@......@@@@.@@....@@.....@@@@@....@@.....@@@.........@@.@@@@.....@@.........@@@@........@@.....@......@@.....@@...........@@.......@@@@.....@@@....@@@...........@@......@@@@.@@....@@.....@@.....@@...@@@@@@@.....@@@@@..............@@@@.........@@.........@@@@@@....@@...............@@@@@..@@.....@@......@@@@@@...........@@....@@@@@.@@...@@@@@@@@@......@@...............@@@@.@@......@@@@.......@@@@.@@....@@............................................................................................................................................................................................................................................................................",
|
||||
".............................................................................................................................@@................................................................................................................................................................@@....................................@@.......................................................................................................................................................@.............................................@@..................................................................................................................................................................................................................................................................................",
|
||||
".............................................................................................................................@@...............................................................................................................................................................@@@....................................@@......................................................................................................................................................@@............................................@@@..................................................................................................................................................................................................................................................................................",
|
||||
".............................................................................................................................@@............................................................................................................................................................@@@@@.....................................@@......................................................................................................................................................@@.......................................@@@@@@@...................................................................................................................................................................................................................................................................................",
|
||||
".............................................................................................................................@@............................................................................................................................................................@@@@......................................@@.....................................................................................................................................................@@........................................@@@@@@....................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"...............................................................................................................................................##.......................................................................##.................##.....................................................................####................................................................................................................................................................##..............................##....................................................##..................................................................................................................................................................................................................................................",
|
||||
".................................................................................................................................############..##.......................................................##..............##.................##....................................................................#####.................................##.............................................................................................................................##..............................##....................................................##..................................................................................................................................................................................................................................................",
|
||||
".................................................................................................................................############..##.......................................................##..............##.................##...................................................................###....................................##.....................................................................................................................##......##..............................##....................................................##..................................................................................................................................................................................................................................................",
|
||||
"......................................................................................................................................##.......##.......................................................................##.................##...................................................................##............................................................................................................................................................##......##..............................##....................................................##..................................................................................................................................................................................................................................................",
|
||||
"......................................................................................................................................##.......##.......................................................................##.................##...................................................................##............................................................................................................................................................##......##..............................##....................................................##..................................................................................................................................................................................................................................................",
|
||||
"......................................................................................................................................##.......##.####........#####.............#######....##.....##....##......####....##.....##..........##.####.....##..###....####.....##....##....##...##.####............######....####.....###....###.........####....##.....##....##.####...####.....##.####......#####.............####.....##......##.....#####.....##..###........#######..##.####........#####............##....######.....#########..##......##...........#######......####.......#######..........................................................................................................................................................................................................................",
|
||||
"......................................................................................................................................##.......########.....########...........########....##.....##....##....#######...##....##...........########....#######..########...##....##....##...########...........######..########....##....##..........####....##.....##....########.######....########....#######..........########....##....##....########....#######........#######..########.....########...........##....#######....#########...##....##...........########....########....########..........................................................................................................................................................................................................................",
|
||||
"......................................................................................................................................##.......###...###....##....###..........##....##....##.....##....##....##....#...##...##............###...###...###......##....##....##...###..##....###...###...........##.....##....##.....##..##.............##....##.....##....###...####...###...###...###..##.....#..........##....##....##....##....##....###...###.............##......###...###....##....###..........##.........###.........###...##....##...........##....##....##....##....##....##..........................................................................................................................................................................................................................",
|
||||
"......................................................................................................................................##.......##.....##...##......##.........##.....##....##.....##....##...##.........##..##.............##.....##...##......##......##...##..####..##....##.....##...........##....##......##.....####..............##....##.....##....##.....##.....##...##.....##..##...............##......##...##....##...##......##...##..............##......##.....##...##......##..........##..........##........###....##....##..........##.....##...##......##..##.....##..........................................................................................................................................................................................................................",
|
||||
"......................................................................................................................................##.......##.....##...##########.........##.....##....##.....##....##...##.........##.##..............##.....##...##......##......##...##..#..#..##....##.....##...........##....##......##.....####..............##....##.....##....##.....##.....##...##.....##..####.............##......##....##..##....##########...##..............##......##.....##...##########..........##......######.......###......##..##...........##.....##...##......##..##.....##..........................................................................................................................................................................................................................",
|
||||
"......................................................................................................................................##.......##.....##...##########.........##.....##....##.....##....##...##.........#####..............##.....##...##......##......##...##..#..#..##....##.....##...........##....##......##......##...............##....##.....##....##.....##.....##...##.....##...######..........##......##....##..##....##########...##..............##......##.....##...##########..........##....########......###.......##..##...........##.....##...##......##..##.....##..........................................................................................................................................................................................................................",
|
||||
"......................................................................................................................................##.......##.....##...##.................##.....##....##.....##....##...##.........######.............##.....##...##......##......##....#.##..##.#.....##.....##...........##....##......##.....####..............##....##.....##....##.....##.....##...##.....##......####.........##......##....##..##....##...........##..............##......##.....##...##..................##...###....##.....###.........#..#............##.....##...##......##..##.....##..........................................................................................................................................................................................................................",
|
||||
"......................................................................................................................................##.......##.....##...##.................##.....##....##.....##....##...##.........##..###............##.....##...##......##......##....###....#.#.....##.....##...........##....##......##.....####..............##....##.....##....##.....##.....##...##.....##........##.........##......##.....####.....##...........##..............##......##.....##...##..................##...##.....##....###..........####............##.....##...##......##..##.....##..........................................................................................................................................................................................................................",
|
||||
"......................................................................................................................................##.......##.....##....###.....#.........###...###....###...###....##....##....#...##...###...........##....##....##.......##....##.....###....###.....##.....##...........##.....##....##.....##..##.............##....###...###....##.....##.....##...##....##...#.....##..........##....##......####......###.....#...##..............##......##.....##....###.....#..........##...##....###...###...........####............###...###....##....##...###...###....##....................................................................................................................................................................................................................",
|
||||
"......................................................................................................................................##.......##.....##....#########..........########.....########....##....#######...##....###..........########....##.......########.....###....###.....##.....##...........##.....########....##....##............##.....########....##.....##.....##...########...#######...........########.......##.......#########...##..............######..##.....##....#########..........##...#########...#########......##..............########....########....########....##....................................................................................................................................................................................................................",
|
||||
"......................................................................................................................................##.......##.....##......######............####.##......####.##....##.....#####....##.....###.........##.####.....##.........####........##.....#......##.....##...........##.......####.....###....###...........##......####.##....##.....##.....##...#######.....#####..............####.........##.........######....##...............#####..##.....##......######...........##....#####.##...#########......##...............####.##......####.......####.##....##....................................................................................................................................................................................................................",
|
||||
".....................................................................................................................................................................................##................................................................................................................................................................##....................................##.......................................................................................................................................................#.............................................##..........................................................................................................................................................................................................................",
|
||||
".....................................................................................................................................................................................##...............................................................................................................................................................###....................................##......................................................................................................................................................##............................................###..........................................................................................................................................................................................................................",
|
||||
".....................................................................................................................................................................................##............................................................................................................................................................#####.....................................##......................................................................................................................................................##.......................................#######...........................................................................................................................................................................................................................",
|
||||
".....................................................................................................................................................................................##............................................................................................................................................................####......................................##.....................................................................................................................................................##........................................######............................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
".......................................................................................................................................................................................................$$.......................................................................$$.................$$.....................................................................$$$$................................................................................................................................................................$$..............................$$....................................................$$..........................................................................................................................................................................................",
|
||||
".........................................................................................................................................................................................$$$$$$$$$$$$..$$.......................................................$$..............$$.................$$....................................................................$$$$$.................................$$.............................................................................................................................$$..............................$$....................................................$$..........................................................................................................................................................................................",
|
||||
".........................................................................................................................................................................................$$$$$$$$$$$$..$$.......................................................$$..............$$.................$$...................................................................$$$....................................$$.....................................................................................................................$$......$$..............................$$....................................................$$..........................................................................................................................................................................................",
|
||||
"..............................................................................................................................................................................................$$.......$$.......................................................................$$.................$$...................................................................$$............................................................................................................................................................$$......$$..............................$$....................................................$$..........................................................................................................................................................................................",
|
||||
"..............................................................................................................................................................................................$$.......$$.......................................................................$$.................$$...................................................................$$............................................................................................................................................................$$......$$..............................$$....................................................$$..........................................................................................................................................................................................",
|
||||
"..............................................................................................................................................................................................$$.......$$.$$$$........$$$$$.............$$$$$$$....$$.....$$....$$......$$$$....$$.....$$..........$$.$$$$.....$$..$$$....$$$$.....$$....$$....$$...$$.$$$$............$$$$$$....$$$$.....$$$....$$$.........$$$$....$$.....$$....$$.$$$$...$$$$.....$$.$$$$......$$$$$.............$$$$.....$$......$$.....$$$$$.....$$..$$$........$$$$$$$..$$.$$$$........$$$$$............$$....$$$$$$.....$$$$$$$$$..$$......$$...........$$$$$$$......$$$$.......$$$$$$$..................................................................................................................................................................",
|
||||
"..............................................................................................................................................................................................$$.......$$$$$$$$.....$$$$$$$$...........$$$$$$$$....$$.....$$....$$....$$$$$$$...$$....$$...........$$$$$$$$....$$$$$$$..$$$$$$$$...$$....$$....$$...$$$$$$$$...........$$$$$$..$$$$$$$$....$$....$$..........$$$$....$$.....$$....$$$$$$$$.$$$$$$....$$$$$$$$....$$$$$$$..........$$$$$$$$....$$....$$....$$$$$$$$....$$$$$$$........$$$$$$$..$$$$$$$$.....$$$$$$$$...........$$....$$$$$$$....$$$$$$$$$...$$....$$...........$$$$$$$$....$$$$$$$$....$$$$$$$$..................................................................................................................................................................",
|
||||
"..............................................................................................................................................................................................$$.......$$$...$$$....$$....$$$..........$$....$$....$$.....$$....$$....$$....$...$$...$$............$$$...$$$...$$$......$$....$$....$$...$$$..$$....$$$...$$$...........$$.....$$....$$.....$$..$$.............$$....$$.....$$....$$$...$$$$...$$$...$$$...$$$..$$.....$..........$$....$$....$$....$$....$$....$$$...$$$.............$$......$$$...$$$....$$....$$$..........$$.........$$$.........$$$...$$....$$...........$$....$$....$$....$$....$$....$$..................................................................................................................................................................",
|
||||
"..............................................................................................................................................................................................$$.......$$.....$$...$$......$$.........$$.....$$....$$.....$$....$$...$$.........$$..$$.............$$.....$$...$$......$$......$$...$$..$$$$..$$....$$.....$$...........$$....$$......$$.....$$$$..............$$....$$.....$$....$$.....$$.....$$...$$.....$$..$$...............$$......$$...$$....$$...$$......$$...$$..............$$......$$.....$$...$$......$$..........$$..........$$........$$$....$$....$$..........$$.....$$...$$......$$..$$.....$$..................................................................................................................................................................",
|
||||
"..............................................................................................................................................................................................$$.......$$.....$$...$$$$$$$$$$.........$$.....$$....$$.....$$....$$...$$.........$$.$$..............$$.....$$...$$......$$......$$...$$..$..$..$$....$$.....$$...........$$....$$......$$.....$$$$..............$$....$$.....$$....$$.....$$.....$$...$$.....$$..$$$$.............$$......$$....$$..$$....$$$$$$$$$$...$$..............$$......$$.....$$...$$$$$$$$$$..........$$......$$$$$$.......$$$......$$..$$...........$$.....$$...$$......$$..$$.....$$..................................................................................................................................................................",
|
||||
"..............................................................................................................................................................................................$$.......$$.....$$...$$$$$$$$$$.........$$.....$$....$$.....$$....$$...$$.........$$$$$..............$$.....$$...$$......$$......$$...$$..$..$..$$....$$.....$$...........$$....$$......$$......$$...............$$....$$.....$$....$$.....$$.....$$...$$.....$$...$$$$$$..........$$......$$....$$..$$....$$$$$$$$$$...$$..............$$......$$.....$$...$$$$$$$$$$..........$$....$$$$$$$$......$$$.......$$..$$...........$$.....$$...$$......$$..$$.....$$..................................................................................................................................................................",
|
||||
"..............................................................................................................................................................................................$$.......$$.....$$...$$.................$$.....$$....$$.....$$....$$...$$.........$$$$$$.............$$.....$$...$$......$$......$$....$.$$..$$.$.....$$.....$$...........$$....$$......$$.....$$$$..............$$....$$.....$$....$$.....$$.....$$...$$.....$$......$$$$.........$$......$$....$$..$$....$$...........$$..............$$......$$.....$$...$$..................$$...$$$....$$.....$$$.........$..$............$$.....$$...$$......$$..$$.....$$..................................................................................................................................................................",
|
||||
"..............................................................................................................................................................................................$$.......$$.....$$...$$.................$$.....$$....$$.....$$....$$...$$.........$$..$$$............$$.....$$...$$......$$......$$....$$$....$.$.....$$.....$$...........$$....$$......$$.....$$$$..............$$....$$.....$$....$$.....$$.....$$...$$.....$$........$$.........$$......$$.....$$$$.....$$...........$$..............$$......$$.....$$...$$..................$$...$$.....$$....$$$..........$$$$............$$.....$$...$$......$$..$$.....$$..................................................................................................................................................................",
|
||||
"..............................................................................................................................................................................................$$.......$$.....$$....$$$.....$.........$$$...$$$....$$$...$$$....$$....$$....$...$$...$$$...........$$....$$....$$.......$$....$$.....$$$....$$$.....$$.....$$...........$$.....$$....$$.....$$..$$.............$$....$$$...$$$....$$.....$$.....$$...$$....$$...$.....$$..........$$....$$......$$$$......$$$.....$...$$..............$$......$$.....$$....$$$.....$..........$$...$$....$$$...$$$...........$$$$............$$$...$$$....$$....$$...$$$...$$$....$$............................................................................................................................................................",
|
||||
"..............................................................................................................................................................................................$$.......$$.....$$....$$$$$$$$$..........$$$$$$$$.....$$$$$$$$....$$....$$$$$$$...$$....$$$..........$$$$$$$$....$$.......$$$$$$$$.....$$$....$$$.....$$.....$$...........$$.....$$$$$$$$....$$....$$............$$.....$$$$$$$$....$$.....$$.....$$...$$$$$$$$...$$$$$$$...........$$$$$$$$.......$$.......$$$$$$$$$...$$..............$$$$$$..$$.....$$....$$$$$$$$$..........$$...$$$$$$$$$...$$$$$$$$$......$$..............$$$$$$$$....$$$$$$$$....$$$$$$$$....$$............................................................................................................................................................",
|
||||
"..............................................................................................................................................................................................$$.......$$.....$$......$$$$$$............$$$$.$$......$$$$.$$....$$.....$$$$$....$$.....$$$.........$$.$$$$.....$$.........$$$$........$$.....$......$$.....$$...........$$.......$$$$.....$$$....$$$...........$$......$$$$.$$....$$.....$$.....$$...$$$$$$$.....$$$$$..............$$$$.........$$.........$$$$$$....$$...............$$$$$..$$.....$$......$$$$$$...........$$....$$$$$.$$...$$$$$$$$$......$$...............$$$$.$$......$$$$.......$$$$.$$....$$............................................................................................................................................................",
|
||||
".............................................................................................................................................................................................................................................$$................................................................................................................................................................$$....................................$$.......................................................................................................................................................$.............................................$$..................................................................................................................................................................",
|
||||
".............................................................................................................................................................................................................................................$$...............................................................................................................................................................$$$....................................$$......................................................................................................................................................$$............................................$$$..................................................................................................................................................................",
|
||||
".............................................................................................................................................................................................................................................$$............................................................................................................................................................$$$$$.....................................$$......................................................................................................................................................$$.......................................$$$$$$$...................................................................................................................................................................",
|
||||
".............................................................................................................................................................................................................................................$$............................................................................................................................................................$$$$......................................$$.....................................................................................................................................................$$........................................$$$$$$....................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"...............................................................................................................................................................................................................................................................%%.......................................................................%%.................%%.....................................................................%%%%................................................................................................................................................................%%..............................%%....................................................%%..................................................................................................................................",
|
||||
".................................................................................................................................................................................................................................................%%%%%%%%%%%%..%%.......................................................%%..............%%.................%%....................................................................%%%%%.................................%%.............................................................................................................................%%..............................%%....................................................%%..................................................................................................................................",
|
||||
".................................................................................................................................................................................................................................................%%%%%%%%%%%%..%%.......................................................%%..............%%.................%%...................................................................%%%....................................%%.....................................................................................................................%%......%%..............................%%....................................................%%..................................................................................................................................",
|
||||
"......................................................................................................................................................................................................................................................%%.......%%.......................................................................%%.................%%...................................................................%%............................................................................................................................................................%%......%%..............................%%....................................................%%..................................................................................................................................",
|
||||
"......................................................................................................................................................................................................................................................%%.......%%.......................................................................%%.................%%...................................................................%%............................................................................................................................................................%%......%%..............................%%....................................................%%..................................................................................................................................",
|
||||
"......................................................................................................................................................................................................................................................%%.......%%.%%%%........%%%%%.............%%%%%%%....%%.....%%....%%......%%%%....%%.....%%..........%%.%%%%.....%%..%%%....%%%%.....%%....%%....%%...%%.%%%%............%%%%%%....%%%%.....%%%....%%%.........%%%%....%%.....%%....%%.%%%%...%%%%.....%%.%%%%......%%%%%.............%%%%.....%%......%%.....%%%%%.....%%..%%%........%%%%%%%..%%.%%%%........%%%%%............%%....%%%%%%.....%%%%%%%%%..%%......%%...........%%%%%%%......%%%%.......%%%%%%%..........................................................................................................",
|
||||
"......................................................................................................................................................................................................................................................%%.......%%%%%%%%.....%%%%%%%%...........%%%%%%%%....%%.....%%....%%....%%%%%%%...%%....%%...........%%%%%%%%....%%%%%%%..%%%%%%%%...%%....%%....%%...%%%%%%%%...........%%%%%%..%%%%%%%%....%%....%%..........%%%%....%%.....%%....%%%%%%%%.%%%%%%....%%%%%%%%....%%%%%%%..........%%%%%%%%....%%....%%....%%%%%%%%....%%%%%%%........%%%%%%%..%%%%%%%%.....%%%%%%%%...........%%....%%%%%%%....%%%%%%%%%...%%....%%...........%%%%%%%%....%%%%%%%%....%%%%%%%%..........................................................................................................",
|
||||
"......................................................................................................................................................................................................................................................%%.......%%%...%%%....%%....%%%..........%%....%%....%%.....%%....%%....%%....%...%%...%%............%%%...%%%...%%%......%%....%%....%%...%%%..%%....%%%...%%%...........%%.....%%....%%.....%%..%%.............%%....%%.....%%....%%%...%%%%...%%%...%%%...%%%..%%.....%..........%%....%%....%%....%%....%%....%%%...%%%.............%%......%%%...%%%....%%....%%%..........%%.........%%%.........%%%...%%....%%...........%%....%%....%%....%%....%%....%%..........................................................................................................",
|
||||
"......................................................................................................................................................................................................................................................%%.......%%.....%%...%%......%%.........%%.....%%....%%.....%%....%%...%%.........%%..%%.............%%.....%%...%%......%%......%%...%%..%%%%..%%....%%.....%%...........%%....%%......%%.....%%%%..............%%....%%.....%%....%%.....%%.....%%...%%.....%%..%%...............%%......%%...%%....%%...%%......%%...%%..............%%......%%.....%%...%%......%%..........%%..........%%........%%%....%%....%%..........%%.....%%...%%......%%..%%.....%%..........................................................................................................",
|
||||
"......................................................................................................................................................................................................................................................%%.......%%.....%%...%%%%%%%%%%.........%%.....%%....%%.....%%....%%...%%.........%%.%%..............%%.....%%...%%......%%......%%...%%..%..%..%%....%%.....%%...........%%....%%......%%.....%%%%..............%%....%%.....%%....%%.....%%.....%%...%%.....%%..%%%%.............%%......%%....%%..%%....%%%%%%%%%%...%%..............%%......%%.....%%...%%%%%%%%%%..........%%......%%%%%%.......%%%......%%..%%...........%%.....%%...%%......%%..%%.....%%..........................................................................................................",
|
||||
"......................................................................................................................................................................................................................................................%%.......%%.....%%...%%%%%%%%%%.........%%.....%%....%%.....%%....%%...%%.........%%%%%..............%%.....%%...%%......%%......%%...%%..%..%..%%....%%.....%%...........%%....%%......%%......%%...............%%....%%.....%%....%%.....%%.....%%...%%.....%%...%%%%%%..........%%......%%....%%..%%....%%%%%%%%%%...%%..............%%......%%.....%%...%%%%%%%%%%..........%%....%%%%%%%%......%%%.......%%..%%...........%%.....%%...%%......%%..%%.....%%..........................................................................................................",
|
||||
"......................................................................................................................................................................................................................................................%%.......%%.....%%...%%.................%%.....%%....%%.....%%....%%...%%.........%%%%%%.............%%.....%%...%%......%%......%%....%.%%..%%.%.....%%.....%%...........%%....%%......%%.....%%%%..............%%....%%.....%%....%%.....%%.....%%...%%.....%%......%%%%.........%%......%%....%%..%%....%%...........%%..............%%......%%.....%%...%%..................%%...%%%....%%.....%%%.........%..%............%%.....%%...%%......%%..%%.....%%..........................................................................................................",
|
||||
"......................................................................................................................................................................................................................................................%%.......%%.....%%...%%.................%%.....%%....%%.....%%....%%...%%.........%%..%%%............%%.....%%...%%......%%......%%....%%%....%.%.....%%.....%%...........%%....%%......%%.....%%%%..............%%....%%.....%%....%%.....%%.....%%...%%.....%%........%%.........%%......%%.....%%%%.....%%...........%%..............%%......%%.....%%...%%..................%%...%%.....%%....%%%..........%%%%............%%.....%%...%%......%%..%%.....%%..........................................................................................................",
|
||||
"......................................................................................................................................................................................................................................................%%.......%%.....%%....%%%.....%.........%%%...%%%....%%%...%%%....%%....%%....%...%%...%%%...........%%....%%....%%.......%%....%%.....%%%....%%%.....%%.....%%...........%%.....%%....%%.....%%..%%.............%%....%%%...%%%....%%.....%%.....%%...%%....%%...%.....%%..........%%....%%......%%%%......%%%.....%...%%..............%%......%%.....%%....%%%.....%..........%%...%%....%%%...%%%...........%%%%............%%%...%%%....%%....%%...%%%...%%%....%%....................................................................................................",
|
||||
"......................................................................................................................................................................................................................................................%%.......%%.....%%....%%%%%%%%%..........%%%%%%%%.....%%%%%%%%....%%....%%%%%%%...%%....%%%..........%%%%%%%%....%%.......%%%%%%%%.....%%%....%%%.....%%.....%%...........%%.....%%%%%%%%....%%....%%............%%.....%%%%%%%%....%%.....%%.....%%...%%%%%%%%...%%%%%%%...........%%%%%%%%.......%%.......%%%%%%%%%...%%..............%%%%%%..%%.....%%....%%%%%%%%%..........%%...%%%%%%%%%...%%%%%%%%%......%%..............%%%%%%%%....%%%%%%%%....%%%%%%%%....%%....................................................................................................",
|
||||
"......................................................................................................................................................................................................................................................%%.......%%.....%%......%%%%%%............%%%%.%%......%%%%.%%....%%.....%%%%%....%%.....%%%.........%%.%%%%.....%%.........%%%%........%%.....%......%%.....%%...........%%.......%%%%.....%%%....%%%...........%%......%%%%.%%....%%.....%%.....%%...%%%%%%%.....%%%%%..............%%%%.........%%.........%%%%%%....%%...............%%%%%..%%.....%%......%%%%%%...........%%....%%%%%.%%...%%%%%%%%%......%%...............%%%%.%%......%%%%.......%%%%.%%....%%....................................................................................................",
|
||||
".....................................................................................................................................................................................................................................................................................................%%................................................................................................................................................................%%....................................%%.......................................................................................................................................................%.............................................%%..........................................................................................................",
|
||||
".....................................................................................................................................................................................................................................................................................................%%...............................................................................................................................................................%%%....................................%%......................................................................................................................................................%%............................................%%%..........................................................................................................",
|
||||
".....................................................................................................................................................................................................................................................................................................%%............................................................................................................................................................%%%%%.....................................%%......................................................................................................................................................%%.......................................%%%%%%%...........................................................................................................",
|
||||
".....................................................................................................................................................................................................................................................................................................%%............................................................................................................................................................%%%%......................................%%.....................................................................................................................................................%%........................................%%%%%%............................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
".......................................................................................................................................................................................................................................................................................................................&&.......................................................................&&.................&&.....................................................................&&&&................................................................................................................................................................&&..............................&&....................................................&&..........................................................................",
|
||||
".........................................................................................................................................................................................................................................................................................................&&&&&&&&&&&&..&&.......................................................&&..............&&.................&&....................................................................&&&&&.................................&&.............................................................................................................................&&..............................&&....................................................&&..........................................................................",
|
||||
".........................................................................................................................................................................................................................................................................................................&&&&&&&&&&&&..&&.......................................................&&..............&&.................&&...................................................................&&&....................................&&.....................................................................................................................&&......&&..............................&&....................................................&&..........................................................................",
|
||||
"..............................................................................................................................................................................................................................................................................................................&&.......&&.......................................................................&&.................&&...................................................................&&............................................................................................................................................................&&......&&..............................&&....................................................&&..........................................................................",
|
||||
"..............................................................................................................................................................................................................................................................................................................&&.......&&.......................................................................&&.................&&...................................................................&&............................................................................................................................................................&&......&&..............................&&....................................................&&..........................................................................",
|
||||
"..............................................................................................................................................................................................................................................................................................................&&.......&&.&&&&........&&&&&.............&&&&&&&....&&.....&&....&&......&&&&....&&.....&&..........&&.&&&&.....&&..&&&....&&&&.....&&....&&....&&...&&.&&&&............&&&&&&....&&&&.....&&&....&&&.........&&&&....&&.....&&....&&.&&&&...&&&&.....&&.&&&&......&&&&&.............&&&&.....&&......&&.....&&&&&.....&&..&&&........&&&&&&&..&&.&&&&........&&&&&............&&....&&&&&&.....&&&&&&&&&..&&......&&...........&&&&&&&......&&&&.......&&&&&&&..................................................",
|
||||
"..............................................................................................................................................................................................................................................................................................................&&.......&&&&&&&&.....&&&&&&&&...........&&&&&&&&....&&.....&&....&&....&&&&&&&...&&....&&...........&&&&&&&&....&&&&&&&..&&&&&&&&...&&....&&....&&...&&&&&&&&...........&&&&&&..&&&&&&&&....&&....&&..........&&&&....&&.....&&....&&&&&&&&.&&&&&&....&&&&&&&&....&&&&&&&..........&&&&&&&&....&&....&&....&&&&&&&&....&&&&&&&........&&&&&&&..&&&&&&&&.....&&&&&&&&...........&&....&&&&&&&....&&&&&&&&&...&&....&&...........&&&&&&&&....&&&&&&&&....&&&&&&&&..................................................",
|
||||
"..............................................................................................................................................................................................................................................................................................................&&.......&&&...&&&....&&....&&&..........&&....&&....&&.....&&....&&....&&....&...&&...&&............&&&...&&&...&&&......&&....&&....&&...&&&..&&....&&&...&&&...........&&.....&&....&&.....&&..&&.............&&....&&.....&&....&&&...&&&&...&&&...&&&...&&&..&&.....&..........&&....&&....&&....&&....&&....&&&...&&&.............&&......&&&...&&&....&&....&&&..........&&.........&&&.........&&&...&&....&&...........&&....&&....&&....&&....&&....&&..................................................",
|
||||
"..............................................................................................................................................................................................................................................................................................................&&.......&&.....&&...&&......&&.........&&.....&&....&&.....&&....&&...&&.........&&..&&.............&&.....&&...&&......&&......&&...&&..&&&&..&&....&&.....&&...........&&....&&......&&.....&&&&..............&&....&&.....&&....&&.....&&.....&&...&&.....&&..&&...............&&......&&...&&....&&...&&......&&...&&..............&&......&&.....&&...&&......&&..........&&..........&&........&&&....&&....&&..........&&.....&&...&&......&&..&&.....&&..................................................",
|
||||
"..............................................................................................................................................................................................................................................................................................................&&.......&&.....&&...&&&&&&&&&&.........&&.....&&....&&.....&&....&&...&&.........&&.&&..............&&.....&&...&&......&&......&&...&&..&..&..&&....&&.....&&...........&&....&&......&&.....&&&&..............&&....&&.....&&....&&.....&&.....&&...&&.....&&..&&&&.............&&......&&....&&..&&....&&&&&&&&&&...&&..............&&......&&.....&&...&&&&&&&&&&..........&&......&&&&&&.......&&&......&&..&&...........&&.....&&...&&......&&..&&.....&&..................................................",
|
||||
"..............................................................................................................................................................................................................................................................................................................&&.......&&.....&&...&&&&&&&&&&.........&&.....&&....&&.....&&....&&...&&.........&&&&&..............&&.....&&...&&......&&......&&...&&..&..&..&&....&&.....&&...........&&....&&......&&......&&...............&&....&&.....&&....&&.....&&.....&&...&&.....&&...&&&&&&..........&&......&&....&&..&&....&&&&&&&&&&...&&..............&&......&&.....&&...&&&&&&&&&&..........&&....&&&&&&&&......&&&.......&&..&&...........&&.....&&...&&......&&..&&.....&&..................................................",
|
||||
"..............................................................................................................................................................................................................................................................................................................&&.......&&.....&&...&&.................&&.....&&....&&.....&&....&&...&&.........&&&&&&.............&&.....&&...&&......&&......&&....&.&&..&&.&.....&&.....&&...........&&....&&......&&.....&&&&..............&&....&&.....&&....&&.....&&.....&&...&&.....&&......&&&&.........&&......&&....&&..&&....&&...........&&..............&&......&&.....&&...&&..................&&...&&&....&&.....&&&.........&..&............&&.....&&...&&......&&..&&.....&&..................................................",
|
||||
"..............................................................................................................................................................................................................................................................................................................&&.......&&.....&&...&&.................&&.....&&....&&.....&&....&&...&&.........&&..&&&............&&.....&&...&&......&&......&&....&&&....&.&.....&&.....&&...........&&....&&......&&.....&&&&..............&&....&&.....&&....&&.....&&.....&&...&&.....&&........&&.........&&......&&.....&&&&.....&&...........&&..............&&......&&.....&&...&&..................&&...&&.....&&....&&&..........&&&&............&&.....&&...&&......&&..&&.....&&..................................................",
|
||||
"..............................................................................................................................................................................................................................................................................................................&&.......&&.....&&....&&&.....&.........&&&...&&&....&&&...&&&....&&....&&....&...&&...&&&...........&&....&&....&&.......&&....&&.....&&&....&&&.....&&.....&&...........&&.....&&....&&.....&&..&&.............&&....&&&...&&&....&&.....&&.....&&...&&....&&...&.....&&..........&&....&&......&&&&......&&&.....&...&&..............&&......&&.....&&....&&&.....&..........&&...&&....&&&...&&&...........&&&&............&&&...&&&....&&....&&...&&&...&&&....&&............................................",
|
||||
"..............................................................................................................................................................................................................................................................................................................&&.......&&.....&&....&&&&&&&&&..........&&&&&&&&.....&&&&&&&&....&&....&&&&&&&...&&....&&&..........&&&&&&&&....&&.......&&&&&&&&.....&&&....&&&.....&&.....&&...........&&.....&&&&&&&&....&&....&&............&&.....&&&&&&&&....&&.....&&.....&&...&&&&&&&&...&&&&&&&...........&&&&&&&&.......&&.......&&&&&&&&&...&&..............&&&&&&..&&.....&&....&&&&&&&&&..........&&...&&&&&&&&&...&&&&&&&&&......&&..............&&&&&&&&....&&&&&&&&....&&&&&&&&....&&............................................",
|
||||
"..............................................................................................................................................................................................................................................................................................................&&.......&&.....&&......&&&&&&............&&&&.&&......&&&&.&&....&&.....&&&&&....&&.....&&&.........&&.&&&&.....&&.........&&&&........&&.....&......&&.....&&...........&&.......&&&&.....&&&....&&&...........&&......&&&&.&&....&&.....&&.....&&...&&&&&&&.....&&&&&..............&&&&.........&&.........&&&&&&....&&...............&&&&&..&&.....&&......&&&&&&...........&&....&&&&&.&&...&&&&&&&&&......&&...............&&&&.&&......&&&&.......&&&&.&&....&&............................................",
|
||||
".............................................................................................................................................................................................................................................................................................................................................................&&................................................................................................................................................................&&....................................&&.......................................................................................................................................................&.............................................&&..................................................",
|
||||
".............................................................................................................................................................................................................................................................................................................................................................&&...............................................................................................................................................................&&&....................................&&......................................................................................................................................................&&............................................&&&..................................................",
|
||||
".............................................................................................................................................................................................................................................................................................................................................................&&............................................................................................................................................................&&&&&.....................................&&......................................................................................................................................................&&.......................................&&&&&&&...................................................",
|
||||
".............................................................................................................................................................................................................................................................................................................................................................&&............................................................................................................................................................&&&&......................................&&.....................................................................................................................................................&&........................................&&&&&&....................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
|
||||
"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................"};
|
BIN
engines/imagemagick/src/test/resources/quick.xwd
Normal file
BIN
engines/imagemagick/src/test/resources/quick.xwd
Normal file
Binary file not shown.
Reference in New Issue
Block a user