sevreporter/src/chartImage.cxx
//
// Function to convert GIF file to PNG file
//
Function to convert GIF file to PNG file
Function to convert GIF file to PNG file
int chartImage::convertGIFtoPNG(char const *giffile, char const *pngfile)
{
  int   retval  = -1;
  char const *command            = 0;
  char const *converter_exec     = 0;
  char const *converter_exec_res = 0;
  if ( giffile && pngfile )
    {
      if ( converter_exec = rptgenArg_value(rptgenArg_GIF_TO_PNG_EXEC) )
	{
	  if ( converter_exec_res = pdexecpath(converter_exec) )
	    {
	      if ( command = pdmpack("sss", "%s %s %s", converter_exec_res, giffile, pngfile) )
		{
		  pdsystem(command);
		  retval = 0;
		}
	    }
	}
    }
  FREE_MEMORY(converter_exec_res);
  FREE_MEMORY(command);
  return retval;
}
int chartImage :: convertGIFtoPNG ( char const * giffile , char const * pngfile ) { int retval = -1 ; char const * command = 0 ; char const * converter_exec = 0 ; char const * converter_exec_res = 0 ; if ( giffile && pngfile ) { if ( converter_exec = rptgenArg_value ( rptgenArg_GIF_TO_PNG_EXEC ) ) { if ( converter_exec_res = pdexecpath ( converter_exec ) ) { if ( command = pdmpack ( " " , " " , converter_exec_res , giffile , pngfile ) ) { pdsystem ( command ) ; retval = 0 ; } } } } FREE_MEMORY ( converter_exec_res ) ; FREE_MEMORY ( command ) ; return retval ; }
Function to convert GIF file to PNG file
Function to convert GIF file to PNG file
// get the gif to png converter program // resolve the converter exec // create command line for conversion program // execute command