Doc #70802 [NEW]: Confusing alpha values in help
| From: | chris at ocproducts dot com | Date: | Tue, 27 Oct 2015 16:20:26 +0000 |
| Subject: | Doc #70802 [NEW]: Confusing alpha values in help | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-12844@lists.php.net to get a copy of this message | ||
From: chris at ocproducts dot com
Operating system:
PHP version: Irrelevant
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:Confusing alpha values in help
Description:
------------
---
From manual page: http://www.php.net/function.imagecolorat
---
The imagecolorsforindex example embedded within the imagecolorat
documentation shows output with alpha of 127.
PHP alpha is inverted from what people normally expect, so people will
think 127 is either fully opaque or 50% opaque (depending how
knowledgable they are).
In-fact, 127 is 0% opaque, i.e. 100% transparent.
The user is very likely to be confused/misled, as:
a) an example showing a fully transparent pixel is not what they'd
assume
b) it is not otherwise mentioned that this example if of a transparent
pixel
c) as the RGB components have actual values, a typical user is really
going to not expect this, as they don't imagine transparent pixels with
RGB values (again, a typical user, not an expert)
If you look at the example on the imagecolorsforindex function page it
uses a more normal example.
I suggest the imagecolorat be given an alpha example with 0.
--
Edit bug report at https://bugs.php.net/bug.php?id=70802&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70802&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70802&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70802&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70802&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70802&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70802&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70802&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70802&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70802&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70802&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70802&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70802&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70802&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70802&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70802&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70802&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70802&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70802&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70802&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70802&r=mysqlcfg