Domanda

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.

È stato utile?

Soluzione

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?

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top