philip Sat Jan 18 22:09:48 2003 EDT
Modified files:
/phpdoc/en/reference/image/functions imagecopyresampled.xml
imagecopyresized.xml
imagecreate.xml
Log:
Document behavior explained in bug #21630, read commit for details. This
closes that bug. Also, imagecreatetruecolor is preferred over imagecreate().
Index: phpdoc/en/reference/image/functions/imagecopyresampled.xml
diff -u phpdoc/en/reference/image/functions/imagecopyresampled.xml:1.2
phpdoc/en/reference/image/functions/imagecopyresampled.xml:1.3
--- phpdoc/en/reference/image/functions/imagecopyresampled.xml:1.2 Wed Apr 17
02:39:11 2002
+++ phpdoc/en/reference/image/functions/imagecopyresampled.xml Sat Jan 18 22:09:47
+2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/image.xml, last change in rev 1.36 -->
<refentry id="function.imagecopyresampled">
<refnamediv>
@@ -36,10 +36,27 @@
<parameter>src_im</parameter>) but if the regions overlap the
results will be unpredictable.
</para>
+ <note>
+ <para>
+ There is a problem due to palette image limitations (255+1 colors).
+ Resampling or filtering an image commonly needs more colors than 255, a
+ kind of approximation is used to calculate the new resampled pixel and its
+ color. With a palette image we try to allocate a new color, if that
+ failed, we choose the closest (in theory) computed color. This is
+ not always the closest visual color. That may produce a weird result, like
+ blank (or visually blank) images. To skip this problem, please use a
+ truecolor image as a destination image, such as one created by
+ <function>imagecreatetruecolor</function>.
+ </para>
+ </note>
+ <note>
+ <para>
+ <function>imagecopyresampled</function> requires GD 2.0.l or greater.
+ </para>
+ </note>
<para>
See also <function>imagecopyresized</function>.
</para>
- <note><para>This function was added in PHP 4.0.6 and requires GD 2.0.1 or
later</para></note>
</refsect1>
</refentry>
Index: phpdoc/en/reference/image/functions/imagecopyresized.xml
diff -u phpdoc/en/reference/image/functions/imagecopyresized.xml:1.2
phpdoc/en/reference/image/functions/imagecopyresized.xml:1.3
--- phpdoc/en/reference/image/functions/imagecopyresized.xml:1.2 Wed Apr 17
02:39:11 2002
+++ phpdoc/en/reference/image/functions/imagecopyresized.xml Sat Jan 18 22:09:48
+2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/image.xml, last change in rev 1.36 -->
<refentry id="function.imagecopyresized">
<refnamediv>
@@ -34,6 +34,19 @@
<parameter>src_im</parameter>) but if the regions overlap the
results will be unpredictable.
</para>
+ <note>
+ <para>
+ There is a problem due to palette image limitations (255+1 colors).
+ Resampling or filtering an image commonly needs more colors than 255, a
+ kind of approximation is used to calculate the new resampled pixel and its
+ color. With a palette image we try to allocate a new color, if that
+ failed, we choose the closest (in theory) computed color. This is
+ not always the closest visual color. That may produce a weird result, like
+ blank (or visually blank) images. To skip this problem, please use a
+ truecolor image as a destination image, such as one created by
+ <function>imagecreatetruecolor</function>.
+ </para>
+ </note>
<para>
See also <function>imagecopyresampled</function>.
</para>
Index: phpdoc/en/reference/image/functions/imagecreate.xml
diff -u phpdoc/en/reference/image/functions/imagecreate.xml:1.3
phpdoc/en/reference/image/functions/imagecreate.xml:1.4
--- phpdoc/en/reference/image/functions/imagecreate.xml:1.3 Thu Apr 18 13:13:09
2002
+++ phpdoc/en/reference/image/functions/imagecreate.xml Sat Jan 18 22:09:48 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/image.xml, last change in rev 1.36 -->
<refentry id="function.imagecreate">
<refnamediv>
@@ -17,6 +17,11 @@
<function>imagecreate</function> returns an image identifier
representing a blank image of size <parameter>x_size</parameter>
by <parameter>y_size</parameter>.
+ </para>
+ <para>
+ We recommend the use of <function>imagecreatetruecolor</function>.
+ </para>
+ <para>
<example>
<title>
Creating a new GD image stream and outputting an image.
@@ -35,6 +40,9 @@
]]>
</programlisting>
</example>
+ </para>
+ <para>
+ See also <function>imagecreatetruecolor</function>.
</para>
</refsect1>
</refentry>
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php