function bmp_to_hex($filename) {
$bmp = file_get_contents($filename);
$output = '';
for($i=0; $i < strlen($bmp); $i++) {
$output .= dechex(ord($test{$i}));
}
return $output;
}
Is this what you meant? If not, clarify, and I'll try to help
(I'm pretty sure this isn't what you meant, but if it is, I hope it helps)