What is the setCompression() equivalent in GraphicsMagick?

352 Views Asked by At

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.

1

There are 1 best solutions below

3
On BEST ANSWER

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] [email protected]

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?