Bug #56574

GraphicalFunctions::imageMagickIdentify() should use last returned row

Added by Alexander Stehlik about 6 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Image Cropping
Target version:
-
Start date:
2014-03-05
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

I experienced a problem with GraphicsMagick when retrieving the image size with GraphicalFunctions::imageMagickIdentify().

The command executed by the system is:

'/usr/bin/gm' identify '/path/to/my/pdf/file.pdf'[0]

The result of the GraphicsMagick call is:

**** Warning: glyf overlaps cmap, truncating.
**** Warning: glyf overlaps cmap, truncating.
/path/to/my/pdf/file.pdf PDF 595x842+0+0 DirectClass 8-bit 1.4M 0.000u 0:01

My GraphicsMagick version is:

GraphicsMagick 1.3.16 2012-06-23 Q8 http://www.GraphicsMagick.org/

The problem is, that the first two lines are written to stdout, not stderr. This is obviously a GraphicsMagick issue but I'm wondering if we could implement a workaround by simply using the last line instead of the first line that is beeing returned?

Associated revisions

Revision 0a85c231 (diff)
Added by Alexander Stehlik about 6 years ago

[BUGFIX] Use last result line of identify command

In GraphicalFunctions::imageMagickIdentify() the last line returned by
the executed command will be used as result.

This prevents the system from using possible error messages printed
before the actual result for further processing.

Resolves: #56574
Releases: 6.2
Change-Id: Ic179e0b68c7fa9a4f0f4b2342cb381c54fb740b9
Reviewed-on: https://review.typo3.org/28076
Reviewed-by: Xavier Perseguers
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind

History

#1 Updated by Gerrit Code Review about 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28076

#2 Updated by Alexander Stehlik about 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#3 Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF