Changeset 4888 for trunk/MagicSoft/Cosy/videodev
- Timestamp:
- 09/08/04 18:01:21 (20 years ago)
- Location:
- trunk/MagicSoft/Cosy/videodev
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/videodev/Writer.cc
r2615 r4888 6 6 #include <stdio.h> // FILE 7 7 #include <png.h> 8 #include <coord.h> 8 9 9 10 #include "MTime.h" … … 12 13 13 14 void Writer::Png(const char *fname, const byte *buf, 14 struct timeval *date )15 struct timeval *date, const XY xy) 15 16 { 16 17 MTime t(*date); … … 21 22 mjd.Append('0', 10-mjd.Length()); 22 23 24 TString pos; 25 pos += xy.X(); 26 pos = pos.Strip(TString::kBoth); 27 pos +="_"; 28 TString posy; 29 posy += xy.Y(); 30 posy = posy.Strip(TString::kBoth); 31 pos +=posy; 32 23 33 TString name = fname; 24 34 name += "_"; 25 35 name += mjd; 36 name += "_"; 37 name += pos; 26 38 name += ".png"; 27 39 … … 125 137 } 126 138 127 void Writer::Ppm(const char *fname, const byte *img, struct timeval *date )139 void Writer::Ppm(const char *fname, const byte *img, struct timeval *date, const XY xy) 128 140 { 129 141 TString name = fname; … … 131 143 MTime t(*date); 132 144 145 TString pos; 146 pos += xy.X(); 147 pos = pos.Strip(TString::kBoth); 148 pos +="_"; 149 TString posy; 150 posy += xy.Y(); 151 posy = posy.Strip(TString::kBoth); 152 pos +=posy; 153 133 154 name += "_"; 134 155 name += t.GetMjd()-52000; 156 name += "_"; 157 name += pos; 135 158 name += ".ppm"; 136 159 -
trunk/MagicSoft/Cosy/videodev/Writer.h
r1816 r4888 9 9 #endif 10 10 11 #ifndef COORD_H 12 #include <coord.h> 13 #endif 14 11 15 typedef unsigned char byte; 12 16 … … 17 21 public: 18 22 19 static void Ppm(const char *fname, const byte *img, struct timeval *date );20 static void Png(const char *fname, const byte *buf, struct timeval *date );23 static void Ppm(const char *fname, const byte *img, struct timeval *date, const XY xy); 24 static void Png(const char *fname, const byte *buf, struct timeval *date, const XY xy); 21 25 22 26 ClassDef(Writer, 0)
Note:
See TracChangeset
for help on using the changeset viewer.