Bug #79622 [Nab]: Imagewbmp outputs an white image with something incomprehensible.
| From: | requinix@php.net | Date: | Sat, 23 May 2020 06:29:06 +0000 |
| Subject: | Bug #79622 [Nab]: Imagewbmp outputs an white image with something incomprehensible. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-227137@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79622&edit=1
ID: 79622
Updated by: requinix@php.net
Reported by: cretu dot andrei at zoho dot com
Summary: Imagewbmp outputs an white image with something
incomprehensible.
Status: Not a bug
Type: Bug
Package: *Graphics related
Operating System: Windows 7, X64
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
If I load your source image into GIMP and have it convert the image to monochrome, which it does so
in a smart way using dithering that GD cannot do, then save and convert with PHP, I get
https://easyupload.io/b86xdf
Previous Comments:
------------------------------------------------------------------------
[2020-05-23 06:21:12] requinix@php.net
WBMPs. Are. Only. Black. And. White.
Most of your source image is light colored. It will be translated into white. The small portions
that are dark will be translated into black.
------------------------------------------------------------------------
[2020-05-23 06:12:33] cretu dot andrei at zoho dot com
Have you tested the code ?
Here is the original image: https://ibb.co/WyRngKD
Here is the result: https://easyupload.io/9r4ka6
Is that ok ?
------------------------------------------------------------------------
[2020-05-23 05:49:45] requinix@php.net
WBMPs only do black and white.
------------------------------------------------------------------------
[2020-05-23 03:43:03] cretu dot andrei at zoho dot com
Description:
------------
I'm using imagecreatefromjpeg to create an image from a source. Then I'm using imagewbmp
to save it as .wbmp.
The image saved is 98% white with a small portion black.
Test script:
---------------
$image_object = imagecreatefromjpeg('http://i.pinimg.com/originals/5b/97/49/5b9749c4db7066138b085b28a229801f.jpg');
imagewbmp($image_object, 'new_image.wbmp');
Expected result:
----------------
A black and white image.
Actual result:
--------------
I see an image allmost white...
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79622&edit=1