|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-05-09 04:05 UTC] 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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 05:00:01 2025 UTC |
<?php print_r(gd_info()); Array ( [GD Version] => 2.1.0 [FreeType Support] => 1 [FreeType Linkage] => with freetype [T1Lib Support] => 1 [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] => )