Project

General

Profile

Actions

Bug #80208

closed

ImageMagick commands fail if stripProfile is set to 0 and GFX[processor_stripColorProfileByDefault] is disabled

Added by Paul Golmann over 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Image Generation / GIFBUILDER
Target version:
Start date:
2017-03-09
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

Problem

When disabling [GFX][processor_stripColorProfileByDefault] in the global configuration and setting stripProfile = 0 for an imgResource in TypoScript or when using the "keep metadata" option in the extension image_autoresize the image does not get processed.

Reproduction

Tested on fresh installations of TYPO3 v6.2.30 with ImageMagick 6.8.7-0 2014-11-14 and TYPO3 v8.6.0 with ImageMagick 6.8.9-9 Q16 x86_64.

setup

1. Set [GFX][processor_stripColorProfileByDefault] = 0 (or [GFX][im_useStripProfileByDefault] = 0 for TYPO3 v6) in Installtool or Localconfiguration.php
2. Upload a test JPEG image to fileadmin (greater than 100x100 px called test.jpg)
2. Create a new page, add a sys_template, add the following setup:

page = PAGE
page {
  10 = IMAGE
  10 {
    file = fileadmin/test.jpg
    file {
      width = 100c
      height = 100c
      stripProfile = 0
    }
  }
}

3. View the page

expected output

The test image cropped to 100x100 pixels.

actual result

The unprocessed test image.

Further information

I tracked the call stack to the CommandUtility in which the marker ###SkipStripProfile### introduced by the ContentObject ends up. In the case that stripping the profile by default is disabled in the global configuration the actual command is something like (depending on the other GFX settings and acutal size of test image):

'/usr/bin/convert' -geometry 100x140! ###SkipStripProfile### -crop 100x100+0+20! '/var/www/html/fileadmin/test.jpg[0]' '/var/www/html/typo3temp/pics/01a24339bf.jpg'
, which produces the following error for me, when testing it directly on the command line:
convert: missing an image filename `100x140!' @ error/convert.c/ConvertImageCommand/3207.

. But should be something like the following, not having the marker in it:
'/usr/bin/convert' -geometry 100x140! -crop 100x100+0+20! '/var/www/html/fileadmin/test.jpg[0]' '/var/www/html/typo3temp/pics/01a24339bf.jpg'

Actions

Also available in: Atom PDF