45 return round($pValue * 9525);
56 return round($pValue / 9525);
74 $size = $pDefaultFont->
getSize();
84 $colWidth = $pValue * 11
102 $size = $pDefaultFont->
getSize();
113 $colWidth = $pValue * $size
119 $colWidth = (int) round($colWidth);
131 return $pValue * 0.67777777;
142 return (
int) ceil($pValue * 1.333333333);
155 return (
int)round($pValue * 60000);
166 return round($pValue / 60000);
182 $file = fopen($p_sFile,
"rb");
183 $read = fread(
$file,10);
184 while(!feof(
$file)&&($read<>
""))
185 $read .= fread(
$file,1024);
187 $temp = unpack(
"H*",$read);
189 $header = substr($hex,0,108);
193 if (substr($header,0,4)==
"424d")
196 $header_parts = str_split($header,2);
199 $width = hexdec($header_parts[19].$header_parts[18]);
202 $height = hexdec($header_parts[23].$header_parts[22]);
205 unset($header_parts);
213 $image = imagecreatetruecolor($width,$height);
216 $body = substr($hex,108);
221 $body_size = (strlen($body)/2);
222 $header_size = ($width*$height);
225 $usePadding = ($body_size>($header_size*3)+4);
229 for ($i=0;$i<$body_size;$i+=3)
253 $r = hexdec($body[$i_pos+4].$body[$i_pos+5]);
254 $g = hexdec($body[$i_pos+2].$body[$i_pos+3]);
255 $b = hexdec($body[$i_pos].$body[$i_pos+1]);
258 $color = imagecolorallocate($image,$r,$g,$b);
259 imagesetpixel($image,
$x,$height-
$y,$color);