A slight note since this is not immediately obvious:
Just as the C CropImage() function, you can specify all zero parameters to get an "autocrop" effect, meaning it will remove all single-color "edges" of an image.(PECL gmagick >= Unknown)
Gmagick::cropimage — 画像の一部を抽出する
width
height
xy抽出した Gmagick オブジェクトを返します。
エラー時に GmagickException をスローします。
A slight note since this is not immediately obvious:
Just as the C CropImage() function, you can specify all zero parameters to get an "autocrop" effect, meaning it will remove all single-color "edges" of an image.