sdk-remote/src/examples/urbi-image.cc
static
  int
  format(const std::string& s)
  {
    switch (s[0])
    {
    case 'r': return urbi::IMAGE_RGB;
    case 'y': return urbi::IMAGE_YCbCr;
    case 'p': return urbi::IMAGE_PPM;
    case 'j': return urbi::IMAGE_JPEG;
    default:
      std::cerr << program_name() << ": invalid format: "
                << s << std::endl
                << libport::exit(EX_USAGE);
    }
  }
/// Decode the image format string \s s.
Decode the image format string \s s.
Decode the image format string \ s s .
static
  int
  format(const std::string& s)
  {
    switch (s[0])
    {
    case 'r': return urbi::IMAGE_RGB;
    case 'y': return urbi::IMAGE_YCbCr;
    case 'p': return urbi::IMAGE_PPM;
    case 'j': return urbi::IMAGE_JPEG;
    default:
      std::cerr << program_name() << ": invalid format: "
                << s << std::endl
                << libport::exit(EX_USAGE);
    }
  }
static int format ( const std :: string & s ) { switch ( s [ 0 ] ) { case ' ' : return urbi :: IMAGE_RGB ; case ' ' : return urbi :: IMAGE_YCbCr ; case ' ' : return urbi :: IMAGE_PPM ; case ' ' : return urbi :: IMAGE_JPEG ; default : std :: cerr << program_name ( ) << " " << s << std :: endl << libport :: exit ( EX_USAGE ) ; } }
Decode the image format string \s s.
Decode the image format string \ s s .