is there a chance to convert a bmp images to hexadecimal value?

i am currently using GD library.

help me with this

thank you in advance

    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)

      Write a Reply...