AnsweredAssumed Answered

ImageMagick transformer has first frame only hardcoded

Question asked by cmgray on May 14, 2010
Latest reply on Mar 30, 2012 by lista
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?

Outcomes