cancel
Showing results for 
Search instead for 
Did you mean: 

ImageMagick transformer has first frame only hardcoded

cmgray
Champ in-the-making
Champ in-the-making
Why does the ImageMagickContentTransformerWorker.java file hardcode to only transform the first frame of a source image?

We have multi-page tiff documents that are scanned into the repository that we want to rotate.  But it only rotates and saves the first page.

   protected void transformInternal(File sourceFile, File targetFile, TransformationOptions options) throws Exception
    {
        Map<String, String> properties = new HashMap<String, String>(5);
        // set properties
        if (options instanceof ImageTransformationOptions)
        {
            ImageTransformationOptions imageOptions = (ImageTransformationOptions)options;
            ImageCropOptions cropOptions = imageOptions.getCropOptions();
            ImageResizeOptions resizeOptions = imageOptions.getResizeOptions();
            String commandOptions = imageOptions.getCommandOptions();
            if (cropOptions != null)
            {
                commandOptions = commandOptions + " " + getImageCropCommandOptions(cropOptions);
            }
            if (resizeOptions != null)
            {
                commandOptions = commandOptions + " " + getImageResizeCommandOptions(resizeOptions);
            }
            properties.put(KEY_OPTIONS, commandOptions);
        }
        properties.put(VAR_SOURCE, sourceFile.getAbsolutePath() + "[0]");
        properties.put(VAR_TARGET, targetFile.getAbsolutePath());

I don't see a reason why the "[0]" needs to be there on the command.  Does anyone know why this is?
1 REPLY 1

lista
Star Contributor
Star Contributor
I believe there's a ticket opened for this issue.
https://issues.alfresco.com/jira/browse/ALF-7278
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.