Bug #69611 [Opn->Fbk]: imagecreatefrompng -> imagewebp conversion results in not valid webp file

From: Date: Mon, 11 May 2015 13:14:03 +0000
Subject: Bug #69611 [Opn->Fbk]: imagecreatefrompng -> imagewebp conversion results in not valid webp file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192618@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69611&edit=1

 ID:                 69611
 Updated by:         cmb@php.net
 Reported by:        aron dot novak at agenceinovae dot com
 Summary:            imagecreatefrompng -> imagewebp conversion results
                     in not valid webp file
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            GD related
 Operating System:   Fedora release 21 (Twenty One)
 PHP Version:        5.6.8
 Block user comment: N
 Private report:     N

 New Comment:

I can't reproduce this issue on Windows 7 with PHP 5.6.8 and [GD
Version] => bundled (2.1.0 compatible). Which version of libGD do
you use (see gd_info() or phpinfo())?


Previous Comments:
------------------------------------------------------------------------
[2015-05-09 04:05:37] aron dot novak at agenceinovae dot com

Description:
------------
I was able to convert a jpeg to webp using $im = imagecreatefromjpeg($logo); imagewebp($im);
But the same failed from certain png file.
With a random jpeg file, using imagecreatefromjpeg, it works fine.

Test script:
---------------
<?php

$logo = 'http://download.gna.org/libre-nord/comm/Tux/tux_npdc.png';
$im = imagecreatefrompng($logo);
$temp = tempnam(sys_get_temp_dir(), 'gd');
imagewebp($im, $temp);
imagedestroy($im);
system("display $temp\n");

Expected result:
----------------
The image should be displayed.

Actual result:
--------------
display: insufficient image data in file `/tmp/gdC9IboF' @ error/webp.c/ReadWEBPImage/303.


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=69611&edit=1


Thread (5 messages)

« previous php.bugs (#192618) next »