- Timestamp:
- 03/12/03 14:05:24 (22 years ago)
- Location:
- trunk/MagicSoft/Cosy
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/Changelog
r1815 r1816 1 1 -*-*- END -*-*- 2 2003/03/12 - Daniela Dorner, Thomas Bretz: 3 4 * gui/MGPngReader.cc, gui/MGStarguider.cc, videodev/Writer.[h,cc]: 5 - changed output file names to contain mjd 6 - fixed a cast warning 7 8 9 2 10 2003/03/11 - Daniela Dorner, Thomas Bretz: 3 11 -
trunk/MagicSoft/Cosy/gui/MGPngReader.cc
r1810 r1816 553 553 } 554 554 555 fFile = new TFile( "leds.root", "RECREATE");555 fFile = new TFile(name, "RECREATE"); 556 556 557 557 if (!fFile->IsOpen()) … … 999 999 { 1000 1000 if (fFileType->IsEntryChecked(IDM_kPNG)) 1001 { 1002 static int num = 0; 1003 char name[80]; 1004 sprintf(name, "pix/file%04d.png", num++); 1005 Writer::Png(name, c, tm); 1006 } 1001 Writer::Png("pix/file", c, tm); 1007 1002 1008 1003 if (fFileType->IsEntryChecked(IDM_kPPM)) 1009 { 1010 static int num = 0; 1011 char name[80]; 1012 sprintf(name, "pix/file%04d.ppm", num++); 1013 Writer::Ppm(name, c); 1014 } 1004 Writer::Ppm("pix/file", c, tm); 1015 1005 1016 1006 if (fWriteType->IsEntryChecked(IDM_kOnce)) … … 1149 1139 void MGPngReader::DrawCircle(byte *img, double r) 1150 1140 { 1151 const double rpix = (int)(r*60*60/fSao->GetPixSize()+1);1141 const double rpix = r*60*60/fSao->GetPixSize()+1; 1152 1142 const int cx = 768/2; 1153 1143 const int cy = 576/2; 1154 for (int dx=- rpix*0.7; dx<rpix*0.7; dx++)1144 for (int dx=-(int)(rpix*0.7); dx<(int)(rpix*0.7); dx++) 1155 1145 { 1156 1146 const int dy = (int)sqrt(rpix*rpix-dx*dx); -
trunk/MagicSoft/Cosy/gui/MGStarguider.cc
r1804 r1816 572 572 { 573 573 if (fFileType->IsEntryChecked(IDM_kPNG)) 574 { 575 static int num = 0; 576 char name[80]; 577 sprintf(name, "pix/file%04d.png", num++); 578 Writer::Png(name, c, tm); 579 } 574 Writer::Png("pix/file", c, tm); 580 575 581 576 if (fFileType->IsEntryChecked(IDM_kPPM)) 582 { 583 static int num = 0; 584 char name[80]; 585 sprintf(name, "pix/file%04d.ppm", num++); 586 Writer::Ppm(name, c); 587 } 577 Writer::Ppm("pix/file", c, tm); 588 578 589 579 if (fWriteType->IsEntryChecked(IDM_kOnce)) -
trunk/MagicSoft/Cosy/videodev/Writer.cc
r1804 r1816 14 14 struct timeval *date) 15 15 { 16 cout << "Writing PNG '" << fname << "'" << endl; 16 TString name = fname; 17 18 Timer t(date); 19 20 name += "_"; 21 name += t.GetMjd()-52000; 22 name += ".png"; 23 24 cout << "Writing PNG '" << name << "'" << endl; 17 25 18 26 // 19 27 // open file 20 28 // 21 FILE *fd = fopen( fname, "w");29 FILE *fd = fopen(name, "w"); 22 30 if (!fd) 23 31 { … … 113 121 } 114 122 115 void Writer::Ppm(const char *fname, const byte *img )123 void Writer::Ppm(const char *fname, const byte *img, struct timeval *date) 116 124 { 117 cout << "Writing PPM '" << fname << "'" << endl; 125 TString name = fname; 126 127 Timer t(date); 128 129 name += "_"; 130 name += t.GetMjd()-52000; 131 name += ".ppm"; 132 133 cout << "Writing PPM '" << name << "'" << endl; 118 134 119 135 // 120 136 // open file for writing 121 137 // 122 ofstream fout( fname);138 ofstream fout(name); 123 139 if (!fout) 124 140 { -
trunk/MagicSoft/Cosy/videodev/Writer.h
r1111 r1816 17 17 public: 18 18 19 static void Ppm(const char *fname, const byte *img );19 static void Ppm(const char *fname, const byte *img, struct timeval *date); 20 20 static void Png(const char *fname, const byte *buf, struct timeval *date); 21 21
Note:
See TracChangeset
for help on using the changeset viewer.