22 mjd +=
t.GetMjd()-52000;
23 mjd = mjd.Strip(TString::kBoth);
25 mjd.Append(
'0', 10-mjd.Length());
29 pos = pos.Strip(TString::kBoth);
33 posy = posy.Strip(TString::kBoth);
43 cout <<
"Writing PNG '" << name <<
"'" << endl;
48 FILE *fd = fopen(name,
"w");
51 cout <<
"Warning: Cannot open file for writing." << endl;
58 png_structp fPng = png_create_write_struct(PNG_LIBPNG_VER_STRING,
63 cout <<
"Warning: Unable to create PNG structure" << endl;
69 png_infop fInfo = png_create_info_struct(fPng);
73 cout <<
"Warning: Unable to create PNG info structure" << endl;
74 png_destroy_write_struct (&fPng, NULL);
82 fInfo->color_type = PNG_COLOR_TYPE_GRAY;
87 if (setjmp(fPng->jmpbuf))
89 cout <<
"longjmp Warning: PNG encounterd an error!" << endl;
90 png_destroy_write_struct (&fPng, &fInfo);
98 png_init_io(fPng, fd);
105 png_write_info (fPng, fInfo);
126 for (
unsigned int y=0; y<768*576; y+=768)
127 png_write_row (fPng, (png_byte*)buf+y);
132 png_write_end (fPng, fInfo);
137 png_destroy_write_struct (&fPng, &fInfo);