3

The php.net ImageMagick has setCompression() and setCompressionQuality().

The php.net GraphicsMagick shows no compression methods listed at all. However, this changelog shows that setCompressionQuality() was added in 1.0.8b3 and predefined compression constants are listed here.

What is the setCompression() equivalent for GraphicsMagick? I'm trying to output a lossless jpeg.

JSuar
  • 21,056
  • 4
  • 39
  • 83
Isius
  • 6,712
  • 2
  • 22
  • 31

1 Answers1

2

The source file gmagick_methods.c does not contain an implementation for setCompression. It appears to only have setCompressionQuality implemented.

It looks like it was requested at one point and rejected.

[2010-06-19 04:15 UTC] vito@php.net

setImage, getImage and getImageGeometry had been added to Gmagick. The other functions will not be included, consistent with the GraphicsMagick API.

via https://bugs.php.net/bug.php?id=59166

However, there does appear to be a compression type option in the API (also, available in the utility) so I'm not sure when that was added. Maybe you could try reopening the bug?

JSuar
  • 21,056
  • 4
  • 39
  • 83
  • I don't know C, but this looks like setCompressionQuality() to me. My question is specific to setCompression(). As in, http://us3.php.net/manual/en/imagick.setcompression.php, to set the **type**. – Isius Dec 28 '13 at 23:51
  • Sorry about that. Looked into it again and updated my answers with my findings. – JSuar Dec 29 '13 at 04:48
  • @Isius did my answer help at all? – JSuar Jan 01 '14 at 17:45