Index: trunk/MagicSoft/Cosy/gui/MGPngReader.cc
===================================================================
--- trunk/MagicSoft/Cosy/gui/MGPngReader.cc	(revision 1810)
+++ trunk/MagicSoft/Cosy/gui/MGPngReader.cc	(revision 1816)
@@ -553,5 +553,5 @@
     }
 
-    fFile = new TFile("leds.root", "RECREATE");
+    fFile = new TFile(name, "RECREATE");
 
     if (!fFile->IsOpen())
@@ -999,18 +999,8 @@
     {
         if (fFileType->IsEntryChecked(IDM_kPNG))
-        {
-            static int num = 0;
-            char name[80];
-            sprintf(name, "pix/file%04d.png", num++);
-            Writer::Png(name, c, tm);
-        }
+            Writer::Png("pix/file", c, tm);
 
         if (fFileType->IsEntryChecked(IDM_kPPM))
-        {
-            static int num = 0;
-            char name[80];
-            sprintf(name, "pix/file%04d.ppm", num++);
-            Writer::Ppm(name, c);
-        }
+            Writer::Ppm("pix/file", c, tm);
 
         if (fWriteType->IsEntryChecked(IDM_kOnce))
@@ -1149,8 +1139,8 @@
 void MGPngReader::DrawCircle(byte *img, double r)
 {
-    const double rpix = (int)(r*60*60/fSao->GetPixSize()+1);
+    const double rpix = r*60*60/fSao->GetPixSize()+1;
     const int cx = 768/2;
     const int cy = 576/2;
-    for (int dx=-rpix*0.7; dx<rpix*0.7; dx++)
+    for (int dx=-(int)(rpix*0.7); dx<(int)(rpix*0.7); dx++)
     {
         const int dy = (int)sqrt(rpix*rpix-dx*dx);
Index: trunk/MagicSoft/Cosy/gui/MGStarguider.cc
===================================================================
--- trunk/MagicSoft/Cosy/gui/MGStarguider.cc	(revision 1810)
+++ trunk/MagicSoft/Cosy/gui/MGStarguider.cc	(revision 1816)
@@ -572,18 +572,8 @@
     {
         if (fFileType->IsEntryChecked(IDM_kPNG))
-        {
-            static int num = 0;
-            char name[80];
-            sprintf(name, "pix/file%04d.png", num++);
-            Writer::Png(name, c, tm);
-        }
+            Writer::Png("pix/file", c, tm);
 
         if (fFileType->IsEntryChecked(IDM_kPPM))
-        {
-            static int num = 0;
-            char name[80];
-            sprintf(name, "pix/file%04d.ppm", num++);
-            Writer::Ppm(name, c);
-        }
+            Writer::Ppm("pix/file", c, tm);
 
         if (fWriteType->IsEntryChecked(IDM_kOnce))
