public static function HasJpegHeader( string $file, string $firstBytes = null ) : bool
   {

      if ( empty( $firstBytes ) )
      {
         $firstBytes = File::ReadFirstBytes( $file, 4 );
      }

      return (
            ( 'ff' == \dechex( \ord( $firstBytes [ 0 ] ) ) )
         && ( 'd8' == \dechex( \ord( $firstBytes [ 1 ] ) ) )
         && ( 'ff' == \dechex( \ord( $firstBytes [ 2 ] ) ) )
      );

   }