aboutsummaryrefslogtreecommitdiff
path: root/noao/nproto/ir/irimzero.x
diff options
context:
space:
mode:
Diffstat (limited to 'noao/nproto/ir/irimzero.x')
-rw-r--r--noao/nproto/ir/irimzero.x22
1 files changed, 22 insertions, 0 deletions
diff --git a/noao/nproto/ir/irimzero.x b/noao/nproto/ir/irimzero.x
new file mode 100644
index 00000000..013ab2d6
--- /dev/null
+++ b/noao/nproto/ir/irimzero.x
@@ -0,0 +1,22 @@
+
+# IR_IMZERO -- Fill the output image with a constant value.
+
+procedure ir_imzero (im, ncols, nlines, value)
+
+pointer im # pointer to the output image
+int ncols # number of columns
+int nlines # number of lines
+real value # default blank value
+
+int i
+pointer obuf
+pointer impl2r()
+
+begin
+ do i = 1, nlines {
+ obuf = impl2r (im, i)
+ if (obuf == EOF)
+ call error (0, "Error writing output image.")
+ call amovkr (value, Memr[obuf], ncols)
+ }
+end