Newbie trying to use convert in php
Posted: 2007-01-21T18:24:26-07:00
I'm trying to create a gif from a jpg, thumbnail it and make the white transparent.
I've been reading the forums 'til my eyes were buggy... finally saw about debug all and verbose so I have a wee bit of output
Here's my code:
Here's a sample of my output :
Basically the debug info I'm getting is just
destroy $src[0]
Any suggestions? help?
Thanks,
Linda
I've been reading the forums 'til my eyes were buggy... finally saw about debug all and verbose so I have a wee bit of output
Here's my code:
Code: Select all
//$src is passed to the function
$new_src = strrev( strchr(strrev($src),'.') ) . "gif";
$exec_stmt = "/usr/bin/convert ".$src." -fuzz 10% -debug all -verbose -quality 95 -resize ".$width." -transparency white ".$new_src;
$ret_val = exec("$exec_stmt");
if ($ret_val ||(!file_exists($new_src)) ) return $ret_val.'-'.$exec_stmt;
Code: Select all
destroy modules/catalog/images/tn-flsalpine.jpg[0]-/usr/bin/convert modules/catalog/images/tn-flsalpine.jpg -fuzz 10% -debug all -verbose -quality 95 -resize 100 -transparency white modules/catalog/images/tn-flsalpine.gif
destroy modules/catalog/images/abrun.jpg[0]-/usr/bin/convert modules/catalog/images/abrun.jpg -fuzz 10% -debug all -verbose -quality 95 -resize 100 -transparency white modules/catalog/images/abrun.gif
destroy modules/catalog/images/fls-ig3215.jpg[0]-/usr/bin/convert modules/catalog/images/fls-ig3215.jpg -fuzz 10% -debug all -verbose -quality 95 -resize 100 -transparency white modules/catalog/images/fls-ig3215.gif
destroy modules/catalog/images/konini.jpg[0]-/usr/bin/convert modules/catalog/images/konini.jpg -fuzz 10% -debug all -verbose -quality 95 -resize 100 -transparency white modules/catalog/images/konini.gif
destroy
destroy $src[0]
Any suggestions? help?
Thanks,
Linda