Doc #70802 [Opn]: Confusing alpha values in help
| From: | cmb@php.net | Date: | Sat, 28 Jan 2017 19:17:57 +0000 |
| Subject: | Doc #70802 [Opn]: Confusing alpha values in help | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-14396@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70802&edit=1
ID: 70802
Updated by: cmb@php.net
Reported by: chris at ocproducts dot com
Summary: Confusing alpha values in help
Status: Open
Type: Documentation Problem
Package: GD related
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Related to bug #67900.
Previous Comments:
------------------------------------------------------------------------
[2015-10-27 16:20:24] chris at ocproducts dot com
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 this bug report at https://bugs.php.net/bug.php?id=70802&edit=1