adesso funziona ma purtroppo, ho riscontrato le seguenti problematiche:
1) interpreta, solo le immagini jpg o jpeg, ma non gif e/o png, nonostante la funzione preveda l'utilizzo di tali immagini come la funzione seguente:
codice:
function _parsepng($file)
{
//Extract info from a PNG file
$f=fopen($file,'rb');
//Extract info from a PNG file
if(!$f) $this->Error('Can\'t open image file: '.$file);
//Check signature
if(fread($f,8)!=chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10))
$this->Error('Not a PNG file: '.$file);
//Read header chunk
fread($f,4);
if(fread($f,4)!='IHDR') $this->Error('Incorrect PNG file: '.$file);
$w=$this->_freadint($f);
$h=$this->_freadint($f);
$bpc=ord(fread($f,1));
if($bpc>8) $this->Error('16-bit depth not supported: '.$file);
$ct=ord(fread($f,1));
if($ct==0) $colspace='DeviceGray';
elseif($ct==2) $colspace='DeviceRGB';
elseif($ct==3) $colspace='Indexed';
else $this->Error('Alpha channel not supported: '.$file);
if(ord(fread($f,1))!=0) $this->Error('Unknown compression method: '.$file);
if(ord(fread($f,1))!=0) $this->Error('Unknown filter method: '.$file);
if(ord(fread($f,1))!=0) $this->Error('Interlacing not supported: '.$file);
fread($f,4);
$parms='/DecodeParms <</Predictor 15 /Colors '.($ct==2 ? 3 : 1).' /BitsPerComponent '.$bpc.' /Columns '.$w.'>>';
//Scan chunks looking for palette, transparency and image data
$pal='';
$trns='';
$data='';
do
{
$n=$this->_freadint($f);
$type=fread($f,4);
if($type=='PLTE')
{
//Read palette
$pal=fread($f,$n);
fread($f,4);
}
elseif($type=='tRNS')
{
//Read transparency info
$t=fread($f,$n);
if($ct==0) $trns=array(ord(substr($t,1,1)));
elseif($ct==2) $trns=array(ord(substr($t,1,1)),ord(substr($t,3,1)),ord(substr($t,5,1)));
else
{
$pos=strpos($t,chr(0));
if(is_int($pos)) $trns=array($pos);
}
fread($f,4);
}
elseif($type=='IDAT')
{
//Read image data block
$data.=fread($f,$n);
fread($f,4);
}
elseif($type=='IEND') break;
else fread($f,$n+4);
}
while($n);
if($colspace=='Indexed' and empty($pal)) $this->Error('Missing palette in '.$file);
fclose($f);
return array('w'=>$w,'h'=>$h,'cs'=>$colspace,'bpc'=>$bpc,'f'=>'FlateDecode','parms'=>$parms,'pal'=>$pal,'trns'=>$trns,'data'=>$data);
}
2) non interpreta i CSS?cioè ho creato una tabella cosi:
codice:
"<table class='floatbox' style='border: 1px solid #b4b4b4;background-color:#f0f0f0' width='100%' height='100%' cellpadding='0' cellspacing='0'>
<tr>
<td>Sono io,Sono io,Sono io,Sono io,Sono io</td>
</tr>
<tr>
<td>Sono io,Sono io,Sono io,Sono io,Sono io</td>
</tr>
</table>
";
ed il problema è che, non mi stampa il colore di sfondo com'è possibile?
Per il momento solo questo, vi ringrazio e vi auguro una buona giornata