On 04.11.2017 at 18:39, Rowan Collins wrote:

> On 4 November 2017 16:40:56 GMT+00:00, Andreas Treichel <gmb...@gmail.com> 
> wrote:
>
>> The only 
>> exception is image2wbmp which is renamed to image_to_wbmp. 
> 
> What is the difference between imagewbmp and image2wbmp? If we're going to 
> rename things, shouldn't that difference be made clearer? Or should we be 
> looking to deprecate one of them anyway?

WBMP images are monochrome (at least in practice).  Theoretically,
image2wbmp() allows to set a threshold (light pixels will become
foreground, dark pixels will become background), but imagewbmp() allows
only to chose a foreground color (all other pixels will become
background).  However, this somewhat useful distinction has been removed
as of PHP 5.0.0, see <https://bugs.php.net/73317>.

Re-introducing the supposed functionality of image2wbmp() doesn't appear
to be sensible after that long time, so I'm +1 on deprecating the
function.  Instead we might consider to add a general function to
convert an image to monochrome according to a given brightness threshold.

And frankly, I have doubts that WBMP is of any real value nowadays, so
we might consider to deprecate both functions (imagecreatefromwbmp()
might still be useful to convert old WBMP images to a more contemporary
format).

-- 
Christoph M. Becker

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to