projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r117: *** empty log message ***
[ctsim.git]
/
src
/
if2img.cpp
diff --git
a/src/if2img.cpp
b/src/if2img.cpp
index c3a4bfe801ab80d56c42cd8afc4055db9faaaaec..a230974db30135b812917d6bb802d00f48372e24 100644
(file)
--- a/
src/if2img.cpp
+++ b/
src/if2img.cpp
@@
-9,7
+9,7
@@
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: if2img.cpp,v 1.
7 2000/06/19 17:58:13
kevin Exp $
+** $Id: if2img.cpp,v 1.
8 2000/06/22 10:17:28
kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
@@
-451,7
+451,7
@@
sdf2d_to_pgm (ImageFile& im, char *outfile, int nxcell, int nycell, double densm
int ny = im.ny();
ImageFileArray v = im.getArray();
int ny = im.ny();
ImageFileArray v = im.getArray();
- unsigned char
* rowp = new unsigned char
[nx * nxcell];
+ unsigned char
rowp
[nx * nxcell];
if ((fp = fopen (outfile, "wb")) == NULL)
return;
if ((fp = fopen (outfile, "wb")) == NULL)
return;
@@
-474,7
+474,6
@@
sdf2d_to_pgm (ImageFile& im, char *outfile, int nxcell, int nycell, double densm
fprintf(fp, "%c ", rowp[ic]);
}
}
fprintf(fp, "%c ", rowp[ic]);
}
}
- delete rowp;
fclose(fp);
}
fclose(fp);
}
@@
-487,7
+486,7
@@
sdf2d_to_pgmasc (ImageFile& im, char *outfile, int nxcell, int nycell, double de
int ny = im.ny();
ImageFileArray v = im.getArray();
int ny = im.ny();
ImageFileArray v = im.getArray();
- unsigned char
* rowp = new unsigned char
[nx * nxcell];
+ unsigned char
rowp
[nx * nxcell];
if (rowp == NULL)
return;
if (rowp == NULL)
return;
@@
-513,7
+512,6
@@
sdf2d_to_pgmasc (ImageFile& im, char *outfile, int nxcell, int nycell, double de
fprintf(fp, "\n");
}
}
fprintf(fp, "\n");
}
}
- delete rowp;
fclose(fp);
}
fclose(fp);
}
@@
-531,7
+529,7
@@
sdf2d_to_png (ImageFile& im, char *outfile, int bitdepth, int nxcell, int nycell
int ny = im.ny();
ImageFileArray v = im.getArray();
int ny = im.ny();
ImageFileArray v = im.getArray();
- unsigned char
* rowp = new unsigned char
[nx * nxcell * (bitdepth / 8)];
+ unsigned char
rowp
[nx * nxcell * (bitdepth / 8)];
if ((fp = fopen (outfile, "wb")) == NULL)
return;
if ((fp = fopen (outfile, "wb")) == NULL)
return;
@@
-580,7
+578,6
@@
sdf2d_to_png (ImageFile& im, char *outfile, int bitdepth, int nxcell, int nycell
for (int ir = 0; ir < nycell; ir++)
png_write_rows (png_ptr, &row_pointer, 1);
}
for (int ir = 0; ir < nycell; ir++)
png_write_rows (png_ptr, &row_pointer, 1);
}
- delete rowp;
png_write_end(png_ptr, info_ptr);
png_destroy_write_struct(&png_ptr, &info_ptr);
png_write_end(png_ptr, info_ptr);
png_destroy_write_struct(&png_ptr, &info_ptr);
@@
-605,7
+602,7
@@
sdf2d_to_gif (ImageFile& im, char *outfile, int nxcell, int nycell, double densm
int ny = im.ny();
ImageFileArray v = im.getArray();
int ny = im.ny();
ImageFileArray v = im.getArray();
- u
snigned char* rowp = new unsigned char
[nx * nxcell];
+ u
nsigned char rowp
[nx * nxcell];
if (rowp == NULL)
return;
if (rowp == NULL)
return;
@@
-628,7
+625,6
@@
sdf2d_to_gif (ImageFile& im, char *outfile, int nxcell, int nycell, double densm
}
}
}
}
}
}
- delete rowp;
if ((out = fopen(outfile,"w")) == NULL) {
sys_error(ERR_FATAL, "Error opening output file %s for writing", outfile);
if ((out = fopen(outfile,"w")) == NULL) {
sys_error(ERR_FATAL, "Error opening output file %s for writing", outfile);