From 3cb7b87445efa64547ed5b2ef11590a1589e68b2 Mon Sep 17 00:00:00 2001 From: Christoph Michael Becker Date: Sat, 23 Jul 2016 13:16:11 +0000 Subject: [PATCH] Most image writing functions accept also a stream as second argument git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@339706 c90b9560-bf6c-de11-be94-00142212c4b1 --- language-snippets.ent | 2 +- reference/image/functions/imagegd.xml | 32 ++++++++++++++++++++++--- reference/image/functions/imagegd2.xml | 32 ++++++++++++++++++++++--- reference/image/functions/imagegif.xml | 32 ++++++++++++++++++++++--- reference/image/functions/imagejpeg.xml | 15 ++++++++---- reference/image/functions/imagepng.xml | 11 +++++++-- reference/image/functions/imagewbmp.xml | 30 +++++++++++++++++++++-- reference/image/functions/imagewebp.xml | 29 ++++++++++++++++++++-- reference/image/functions/imagexbm.xml | 2 +- 9 files changed, 164 insertions(+), 21 deletions(-) diff --git a/language-snippets.ent b/language-snippets.ent index 4b94647f79..9bdfda7931 100644 --- a/language-snippets.ent +++ b/language-snippets.ent @@ -554,7 +554,7 @@ own font identifiers registered with imageloadfont. - + diff --git a/reference/image/functions/imagegd.xml b/reference/image/functions/imagegd.xml index 53faad2ead..82a004605a 100644 --- a/reference/image/functions/imagegd.xml +++ b/reference/image/functions/imagegd.xml @@ -10,10 +10,10 @@ boolimagegd resourceimage - stringfilename + mixedto - Outputs a GD image to the given filename. + Outputs a GD image to the given to. @@ -22,7 +22,7 @@ &gd.image.description; - filename + to &gd.image.path; @@ -36,6 +36,32 @@ &return.success; + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 5.4.0 + + Added support for passing a stream resource to + to. + + + + + + + + &reftitle.examples; diff --git a/reference/image/functions/imagegd2.xml b/reference/image/functions/imagegd2.xml index 3f08c61e94..6b9fefbb0e 100644 --- a/reference/image/functions/imagegd2.xml +++ b/reference/image/functions/imagegd2.xml @@ -10,12 +10,12 @@ boolimagegd2 resourceimage - stringfilename + mixedto intchunk_size inttypeIMG_GD2_RAW - Outputs a GD2 image to the given filename. + Outputs a GD2 image to the given to. @@ -24,7 +24,7 @@ &gd.image.description; - filename + to &gd.image.path; @@ -56,6 +56,32 @@ &return.success; + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 5.4.0 + + Added support for passing a stream resource to + to. + + + + + + + + &reftitle.examples; diff --git a/reference/image/functions/imagegif.xml b/reference/image/functions/imagegif.xml index 5d30cbfa4b..3976857702 100644 --- a/reference/image/functions/imagegif.xml +++ b/reference/image/functions/imagegif.xml @@ -10,11 +10,11 @@ boolimagegif resourceimage - stringfilename + mixedto imagegif creates the GIF - file in filename from the image image. The + file in to from the image image. The image argument is the return from the imagecreate or imagecreatefrom* function. @@ -32,7 +32,7 @@ &gd.image.description; - filename + to &gd.image.path; @@ -46,6 +46,32 @@ &return.success; + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 5.4.0 + + Added support for passing a stream resource to + to. + + + + + + + + &reftitle.examples; diff --git a/reference/image/functions/imagejpeg.xml b/reference/image/functions/imagejpeg.xml index 1d82a51268..fad4ae7f81 100644 --- a/reference/image/functions/imagejpeg.xml +++ b/reference/image/functions/imagejpeg.xml @@ -10,7 +10,7 @@ boolimagejpeg resourceimage - stringfilename + mixedto intquality @@ -24,7 +24,7 @@ &gd.image.description; - filename + to &gd.image.path; @@ -120,7 +120,7 @@ imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color); // Set the content type header - in this case image/jpeg header('Content-Type: image/jpeg'); -// Skip the filename parameter using NULL, then set the quality to 75% +// Skip the to parameter using NULL, then set the quality to 75% imagejpeg($im, NULL, 75); // Free up memory @@ -157,7 +157,14 @@ imagedestroy($im); 5.4.0 - Disallowed passing an empty string to filename to + Added support for passing a stream resource to + to. + + + + 5.4.0 + + Disallowed passing an empty string to to to skip this argument. diff --git a/reference/image/functions/imagepng.xml b/reference/image/functions/imagepng.xml index b8e5baa9f5..f9631a7504 100644 --- a/reference/image/functions/imagepng.xml +++ b/reference/image/functions/imagepng.xml @@ -10,7 +10,7 @@ boolimagepng resourceimage - stringfilename + mixedto intquality intfilters @@ -25,7 +25,7 @@ &gd.image.description; - filename + to &gd.image.path; @@ -78,6 +78,13 @@ + + 5.4.0 + + Added support for passing a stream resource to + to. + + 5.1.3 diff --git a/reference/image/functions/imagewbmp.xml b/reference/image/functions/imagewbmp.xml index a5235f4d8c..a8435a7001 100644 --- a/reference/image/functions/imagewbmp.xml +++ b/reference/image/functions/imagewbmp.xml @@ -10,7 +10,7 @@ boolimagewbmp resourceimage - stringfilename + mixedto intforeground @@ -24,7 +24,7 @@ &gd.image.description; - filename + to &gd.image.path; @@ -48,6 +48,32 @@ &return.success; + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 5.4.0 + + Added support for passing a stream resource to + to. + + + + + + + + &reftitle.examples; diff --git a/reference/image/functions/imagewebp.xml b/reference/image/functions/imagewebp.xml index ff37fe44e2..d86cb755ea 100644 --- a/reference/image/functions/imagewebp.xml +++ b/reference/image/functions/imagewebp.xml @@ -11,7 +11,7 @@ boolimagewebp resourceimage - stringfilename + mixedto Outputs or save an WebP version of the given image. @@ -24,7 +24,7 @@ &gd.image.description; - filename + to &gd.image.path; @@ -40,6 +40,31 @@ + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 5.4.0 + + Added support for passing a stream resource to + to. + + + + + + + + &reftitle.examples; diff --git a/reference/image/functions/imagexbm.xml b/reference/image/functions/imagexbm.xml index 2c3cae71d3..f19eb6912e 100644 --- a/reference/image/functions/imagexbm.xml +++ b/reference/image/functions/imagexbm.xml @@ -33,7 +33,7 @@ filename - &gd.image.path; + The path to save the file to. If not set or &null;, the raw image stream will be outputted directly. The filename (without the .xbm extension) is also used for the C identifiers of the XBM, whereby non