예제 #1
0
파일: launch.c 프로젝트: wavs/ocre
/**
 * This function starts the extraction process without
 * the display option.
 *
 * @param infos Informations about the launch process.
 */
void launchProgramWithoutDisplay(t_launch_infos *infos)
{
  SDL_Surface *screen;

  screen = NULL;
  if (infos->inFile != NULL && infos->outFile != NULL)
    {
      if (is_bmp(infos->inFile))
	{
	  InitSDL(screen);
	  processAll(infos);
	  SDL_Quit();
	}
      else
	{
	  help("learn");
	  wfree(infos);
	  exit(EXIT_SUCCESS);
	}
    }
}
예제 #2
0
파일: launch.c 프로젝트: wavs/ocre
/**
 * This function starts the extraction process with
 * the display option.
 * @param infos Informations about the launch process.
 */
void launchProgramWithDisplay(t_launch_infos *infos)
{
  SDL_Surface *screen;

  screen = NULL;
  if (infos->inFile != NULL && infos->outFile != NULL)
    {
      if (is_bmp(infos->inFile))
	{
	  InitSDL(screen,1);
	  /* Process */
	  waitLoop();
	  SDL_Quit();
	}
      else
	{
	  help("extract");
	  wfree(infos);
	  exit(EXIT_SUCCESS);
	}
    }
}
예제 #3
0
static SkImageDecoder::Format get_format_bmp(SkStreamRewindable* stream) {
    if (is_bmp(stream)) {
        return SkImageDecoder::kBMP_Format;
    }
    return SkImageDecoder::kUnknown_Format;
}
예제 #4
0
static SkImageDecoder* sk_libbmp_dfactory(SkStreamRewindable* stream) {
    if (is_bmp(stream)) {
        return SkNEW(SkBMPImageDecoder);
    }
    return NULL;
}
예제 #5
0
static SkImageDecoder* sk_libbmp_dfactory(SkStreamRewindable* stream) {
    if (is_bmp(stream)) {
        return new SkBMPImageDecoder;
    }
    return nullptr;
}