[DOC-CVS] [doc-en] master: imagick: document the legacy parameter and clarify bestfit (#5056)
[email protected] (Louis-Arnaud via GitHub)
| Newsgroups | php.doc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Louis-Arnaud (lacatoire)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-08-19T12:13:35+02:00
Commit: https://github.com/php/doc-en/commit/2fae40e40323696cab1d4108c8cfb3a424321a88
Raw diff: https://github.com/php/doc-en/commit/2fae40e40323696cab1d4108c8cfb3a424321a88.diff
imagick: document the legacy parameter and clarify bestfit (#5056)
Imagick::resizeImage(), Imagick::scaleImage(),
Imagick::adaptiveResizeImage() and Imagick::cropThumbnailImage() gained
a legacy parameter in PECL imagick 3.4.0, which was undocumented, and
their bestfit parameter had no description of the proportional scaling
it performs.
Fixes #4816
Changed paths:
M reference/imagick/imagick/adaptiveresizeimage.xml
M reference/imagick/imagick/cropthumbnailimage.xml
M reference/imagick/imagick/resizeimage.xml
M reference/imagick/imagick/scaleimage.xml
Diff:
diff --git a/reference/imagick/imagick/adaptiveresizeimage.xml b/reference/imagick/imagick/adaptiveresizeimage.xml
index e5c53733679b..df94cb160cfa 100644
--- a/reference/imagick/imagick/adaptiveresizeimage.xml
+++ b/reference/imagick/imagick/adaptiveresizeimage.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<refentry xmlns="http://docbook.org/ns/docbook" xml:id="imagick.adaptiveresizeimage">
+<refentry xml:id="imagick.adaptiveresizeimage" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Imagick::adaptiveResizeImage</refname>
<refpurpose>Adaptively resize image with data dependent triangulation</refpurpose>
@@ -48,9 +48,21 @@
<varlistentry>
<term><parameter>bestfit</parameter></term>
<listitem>
- <para>
- Whether to fit the image inside a bounding box.
- </para>
+ <simpara>
+ Whether to fit the image within the given dimensions while preserving
+ the aspect ratio.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>legacy</parameter></term>
+ <listitem>
+ <simpara>
+ Optional <type>bool</type> parameter.
+ If set to true, the calculations are done with the small rounding bug
+ that existed in Imagick before 3.4.0. If set to false, the calculations
+ should produce the same results as the ImageMagick command-line tools.
+ </simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -73,31 +85,35 @@
<refsect1 role="changelog">
&reftitle.changelog;
- <para>
- <informaltable>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>&Version;</entry>
- <entry>&Description;</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>PECL imagick 2.1.0</entry>
- <entry>Added optional fit parameter.</entry>
- </row>
- <row>
- <entry>PECL imagick 2.1.0</entry>
- <entry>
- This method now supports proportional scaling.
- Pass zero as either parameter for proportional scaling.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>PECL imagick 2.1.0</entry>
+ <entry>Added optional fit parameter.</entry>
+ </row>
+ <row>
+ <entry>PECL imagick 2.1.0</entry>
+ <entry>
+ This method now supports proportional scaling.
+ Pass zero as either parameter for proportional scaling.
+ </entry>
+ </row>
+ <row>
+ <entry>PECL imagick 3.4.0</entry>
+ <entry>
+ Added the <parameter>legacy</parameter> parameter.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
</refsect1>
<refsect1 role="examples">
diff --git a/reference/imagick/imagick/cropthumbnailimage.xml b/reference/imagick/imagick/cropthumbnailimage.xml
index 1e2cef4fd822..94b66099b7fc 100644
--- a/reference/imagick/imagick/cropthumbnailimage.xml
+++ b/reference/imagick/imagick/cropthumbnailimage.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<refentry xmlns="http://docbook.org/ns/docbook" xml:id="imagick.cropthumbnailimage">
+<refentry xml:id="imagick.cropthumbnailimage" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Imagick::cropThumbnailImage</refname>
<refpurpose>Creates a crop thumbnail</refpurpose>
@@ -40,6 +40,17 @@
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><parameter>legacy</parameter></term>
+ <listitem>
+ <simpara>
+ Optional <type>bool</type> parameter.
+ If set to true, the calculations are done with the small rounding bug
+ that existed in Imagick before 3.4.0. If set to false, the calculations
+ should produce the same results as the ImageMagick command-line tools.
+ </simpara>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
@@ -57,6 +68,27 @@
&imagick.imagick.throws;
</para>
</refsect1>
+ <refsect1 role="changelog">
+ &reftitle.changelog;
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>PECL imagick 3.4.0</entry>
+ <entry>
+ Added the <parameter>legacy</parameter> parameter.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </refsect1>
</refentry>
diff --git a/reference/imagick/imagick/resizeimage.xml b/reference/imagick/imagick/resizeimage.xml
index 5e45f8958b09..684a194da065 100644
--- a/reference/imagick/imagick/resizeimage.xml
+++ b/reference/imagick/imagick/resizeimage.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<refentry xmlns="http://docbook.org/ns/docbook" xml:id="imagick.resizeimage">
+<refentry xml:id="imagick.resizeimage" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Imagick::resizeImage</refname>
<refpurpose>Scales an image</refpurpose>
@@ -63,9 +63,23 @@
<varlistentry>
<term><parameter>bestfit</parameter></term>
<listitem>
- <para>
- Optional fit parameter.
- </para>
+ <simpara>
+ Optional <type>bool</type> parameter.
+ If set to true, the image is resized to fit within the given dimensions
+ while preserving the aspect ratio.
+ </simpara>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><parameter>legacy</parameter></term>
+ <listitem>
+ <simpara>
+ Optional <type>bool</type> parameter.
+ If set to true, the calculations are done with the small rounding bug that existed in
+ Imagick before 3.4.0. If set to false, the calculations should produce the same results
+ as the ImageMagick command-line tools.
+ </simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -81,27 +95,31 @@
<refsect1 role="changelog">
&reftitle.changelog;
- <para>
- <informaltable>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>&Version;</entry>
- <entry>&Description;</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>PECL imagick 2.1.0</entry>
- <entry>
- Added optional fit parameter. This method now supports proportional scaling.
- Pass zero as either parameter for proportional scaling.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>PECL imagick 2.1.0</entry>
+ <entry>
+ Added optional fit parameter. This method now supports proportional scaling.
+ Pass zero as either parameter for proportional scaling.
+ </entry>
+ </row>
+ <row>
+ <entry>PECL imagick 3.4.0</entry>
+ <entry>
+ Added the <parameter>legacy</parameter> parameter.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
</refsect1>
diff --git a/reference/imagick/imagick/scaleimage.xml b/reference/imagick/imagick/scaleimage.xml
index c2cc77b118af..3e1e3ef5943d 100644
--- a/reference/imagick/imagick/scaleimage.xml
+++ b/reference/imagick/imagick/scaleimage.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<refentry xmlns="http://docbook.org/ns/docbook" xml:id="imagick.scaleimage">
+<refentry xml:id="imagick.scaleimage" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>Imagick::scaleImage</refname>
<refpurpose>Scales the size of an image</refpurpose>
@@ -29,22 +29,37 @@
<varlistentry>
<term><parameter>columns</parameter></term>
<listitem>
- <para>
- </para>
+ <simpara>
+ The number of columns in the scaled image.
+ </simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>rows</parameter></term>
<listitem>
- <para>
- </para>
+ <simpara>
+ The number of rows in the scaled image.
+ </simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>bestfit</parameter></term>
<listitem>
- <para>
- </para>
+ <simpara>
+ Whether to fit the image within the given dimensions while preserving
+ the aspect ratio.
+ </simpara>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>legacy</parameter></term>
+ <listitem>
+ <simpara>
+ Optional <type>bool</type> parameter.
+ If set to true, the calculations are done with the small rounding bug
+ that existed in Imagick before 3.4.0. If set to false, the calculations
+ should produce the same results as the ImageMagick command-line tools.
+ </simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -67,27 +82,31 @@
<refsect1 role="changelog">
&reftitle.changelog;
- <para>
- <informaltable>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>&Version;</entry>
- <entry>&Description;</entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>PECL imagick 2.1.0</entry>
- <entry>
- Added optional fit parameter. This method now supports proportional scaling.
- Pass zero as either parameter for proportional scaling.
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>PECL imagick 2.1.0</entry>
+ <entry>
+ Added optional fit parameter. This method now supports proportional scaling.
+ Pass zero as either parameter for proportional scaling.
+ </entry>
+ </row>
+ <row>
+ <entry>PECL imagick 3.4.0</entry>
+ <entry>
+ Added the <parameter>legacy</parameter> parameter.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
</refsect1>