ImageMagick のドキュメントでは、有効な画像ジオメトリ引数の形式は次のとおりです。
size General description (actual behavior can vary for different options and settings)
scale% Height and width both scaled by specified percentage.
scale-x%xscale-y% Height and width individually scaled by specified percentages. (Only one % symbol needed.)
width Width given, height automagically selected to preserve aspect ratio.
xheight Height given, width automagically selected to preserve aspect ratio.
widthxheight Maximum values of height and width given, aspect ratio preserved.
widthxheight^ Minimum values of width and height given, aspect ratio preserved.
widthxheight! Width and height emphatically given, original aspect ratio ignored.
widthxheight> Shrinks an image with dimension(s) larger than the corresponding width and/or height argument(s).
widthxheight< Enlarges an image with dimension(s) smaller than the corresponding width and/or height argument(s).
area@ Resize image to have specified area in pixels. Aspect ratio is preserved.
{size}{offset} Specifying the offset (default is +0+0). Below, {size} refers to any of the forms above.
{size}{+-}x{+-}y Horizontal and vertical offsets x and y, specified in pixels. Signs are required for both. Offsets are affected by ‑gravity setting. Offsets are not affected by % or other size operators.
たとえば100%
、 は有効なフォームです (scale%
上記のリストの最初のフォームと一致します)。ただし、Dragonflyはこの正規表現を使用してジオメトリ引数を検証する100%
ため、Dragonfly では受け入れられません。
^\d*x\d*[><%^!]?$|^\d+@$
基本的に のないものx
は、Dragonfly では無効と見なされます。ImageMagick のドキュメントを誤解していますか、それとも Dragonfly の正規表現が間違っていますか?