Doc #76179 [NEW]: image2wbmp: missing default value and documentation for threshold argument
| From: | php4fan at gmail dot com | Date: | Tue, 03 Apr 2018 10:42:38 +0000 |
| Subject: | Doc #76179 [NEW]: image2wbmp: missing default value and documentation for threshold argument | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-15584@lists.php.net to get a copy of this message | ||
From: php4fan at gmail dot com
Operating system:
PHP version: Irrelevant
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:image2wbmp: missing default value and documentation for threshold argument
Description:
------------
---
From manual page: http://www.php.net/function.image2wbmp
---
> bool image2wbmp ( resource $image [, string $filename [, int
$threshold ]] )
> threshold
> Threshold value, between 0 and 255 (inclusive).
First and most important: what the f*** is the default value if none is
given as argument?? The default value for an argument should never be
left undocumented.
Then, there is no explanation whatsoever of how the threshold works at
all (or what it is to start with). My educated guess is that it must be
the threshold of brightness above which a pixel will be converted to
white and below which it will be converted to black. However, the first
non-obvious information that is missing is: what about pixels that have
the exact value of the threshold? That is, will it be white if
>threshold or if >=threshold?
Another non obvious thing is how the threshold works for color images
(as opposed to greyscale). Probably the brightness will be computed and
then compared to the threshold. But what is the exact function used to
compute the brightness from the RGB values?
--
Edit bug report at https://bugs.php.net/bug.php?id=76179&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76179&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76179&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76179&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76179&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76179&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76179&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76179&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76179&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76179&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76179&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76179&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76179&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76179&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76179&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76179&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76179&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76179&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76179&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76179&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76179&r=mysqlcfg