php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70045 imagewebp
Submitted: 2015-07-11 08:10 UTC Modified: 2017-08-14 16:47 UTC
From: stefan at devil dot se Assigned: cmb (profile)
Status: Duplicate Package: GD related
PHP Version: 5.5.27 OS: Ubuntu 14.04.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
26 - 16 = ?
Subscribe to this entry?

 
 [2015-07-11 08:10 UTC] stefan at devil dot se
Description:
------------
I have tested the code below with 8 random jpg images from Google and the images generated are either working as expected or just plain white. All files work with webp command line.

PHP 5.5.9-1ubuntu4.11 (cli) (built: Jul  2 2015 15:23:08)

Array
(
    [GD Version] => 2.1.1-dev
    [FreeType Support] => 1
    [FreeType Linkage] => with freetype
    [T1Lib Support] => 
    [GIF Read Support] => 1
    [GIF Create Support] => 1
    [JPEG Support] => 1
    [PNG Support] => 1
    [WBMP Support] => 1
    [XPM Support] => 1
    [XBM Support] => 1
    [JIS-mapped Japanese Font Support] => 
)

Test script:
---------------
$path = dirname(__FILE__) .'/images/example.jpg';

$im = imagecreatefromjpeg($path);

$webp = imagewebp($im, dirname(__FILE__) .'/images/example.webp');
imagedestroy($im);

var_dump($webp);

Expected result:
----------------
A generated webp image file that displays correctly in Chrome 43.0.2357.132 (64-bit).

Actual result:
--------------
A generated webp image file that seems to have the correct size but is blank in Chrome 43.0.2357.132 (64-bit).

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-07-11 12:05 UTC] cmb@php.net
-Status: Open +Status: Feedback
 [2015-07-11 12:05 UTC] cmb@php.net
Related to bug #69611.

Stefan, please post a link to at least one of the failing images.
 [2015-07-11 16:57 UTC] stefan at devil dot se
Sorry about that. Theese are the images I tested with.

https://www.dropbox.com/s/v6bzyg39j4r28dg/images.tar.gz?dl=1

example.webp
example2.webp
nature.webp (working)
nature2.webp
nature3.webp
nature4.webp (working)
nature5.webp
nature6.webp (working)
 [2015-07-11 22:13 UTC] cmb@php.net
-Status: Feedback +Status: Open
 [2015-07-11 23:32 UTC] cmb@php.net
Umm, I can reproduce the issue with the official Windows binary of
PHP 5.5.19, but not with PHP 5.5.20. As there doesn't seem to be
any relevant change in the bundled libgd between this two
versions, it might be a libvpx issue.
 [2015-07-12 07:22 UTC] stefan at devil dot se
My version:

Package: libvpx1
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 1712
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: libvpx
Version: 1.3.0-2
Depends: libc6 (>= 2.14)
Pre-Depends: multiarch-support
Description: VP8 video codec (shared library)
 VP8 is an open video codec, originally developed by On2 and released
 as open source by Google Inc. It is the successor of the VP3 codec,
 on which the Theora codec was based.
 .
 This package contains the shared libraries.
Original-Maintainer: Sebastian Dröge <slomo@debian.org>
Homepage: http://www.webmproject.org
 [2015-07-13 09:45 UTC] cmb@php.net
FWIW, I can reproduce the issue on Debian 8.1 with php5
5.6.9+dfsg-0+deb8u1 and libvpx1 1.3.0-3.
 [2015-07-19 16:39 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2015-07-19 16:39 UTC] cmb@php.net
I had a look at the generated WebP images that you have supplied.
These are broken because they're lacking the required null byte
padding to even size.

This issue has been reported as bug #66590, and fixed in the
meantime.
 [2017-08-14 16:28 UTC] shishtpal at gmail dot com
i have the same issue with php7-rasp-pi

PHP 7.0.22-2+0~20170804100528.5+jessie~1.gbpdea206 (cli) (built: Aug 10 2017 14:34:58) ( NTS )                      
Copyright (c) 1997-2017 The PHP Group                                                                               
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies                                                       
    with Zend OPcache v7.0.22-2+0~20170804100528.5+jessie~1.gbpdea206, Copyright (c) 1999-2017, by Zend Technologies


what is the solution? thankd
 [2017-08-14 16:47 UTC] cmb@php.net
> i have the same issue with php7-rasp-pi

Please do not reply to closed bug reports. Instead open a new
ticket, and follow the advice on
<https://bugs.php.net/how-to-report.php>.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 15:01:32 2024 UTC