Ignore:
Timestamp:
09/08/04 18:01:21 (20 years ago)
Author:
rwagner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy/videodev
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/videodev/Writer.cc

    r2615 r4888  
    66#include <stdio.h>    // FILE
    77#include <png.h>
     8#include <coord.h>
    89
    910#include "MTime.h"
     
    1213
    1314void Writer::Png(const char *fname, const byte *buf,
    14                  struct timeval *date)
     15                 struct timeval *date, const XY xy)
    1516{
    1617    MTime t(*date);
     
    2122        mjd.Append('0', 10-mjd.Length());
    2223
     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
    2333    TString name = fname;
    2434    name += "_";
    2535    name += mjd;
     36    name += "_";
     37    name += pos;
    2638    name += ".png";
    2739
     
    125137}
    126138
    127 void Writer::Ppm(const char *fname, const byte *img, struct timeval *date)
     139void Writer::Ppm(const char *fname, const byte *img, struct timeval *date, const XY xy)
    128140{
    129141    TString name = fname;
     
    131143    MTime t(*date);
    132144
     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
    133154    name += "_";
    134155    name += t.GetMjd()-52000;
     156    name += "_";
     157    name += pos; 
    135158    name += ".ppm";
    136159
  • trunk/MagicSoft/Cosy/videodev/Writer.h

    r1816 r4888  
    99#endif
    1010
     11#ifndef COORD_H
     12#include <coord.h>
     13#endif
     14
    1115typedef unsigned char byte;
    1216
     
    1721public:
    1822
    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);
    2125
    2226    ClassDef(Writer, 0)
Note: See TracChangeset for help on using the changeset viewer.