/* MX LIBRARY FUNCTION: mxip_image_s_const_add_f2 * * PURPOSE: Add a constant to pixel data of a mxip_image_s structure. * * AUTHOR: K. J. Mighell (mighell@noao.edu) * * LANGUAGE: ANSI C * * DOCUMENTATION: http://www.noao.edu/staff/mighell/mx * * DATE: 20000313 * * MOD: 3 * * Copyleft (L) 2000 Kenneth John Mighell */ #include "mx.h" int mxip_image_s_const_add_f2( struct mxip_image_s *image, double addend ) { char mxfunc[] = "mxip_image_s_const_add_f2"; int status; int j0; status = 0; if ( mxip_image_s_ok_f1 (image) ) { status = 1; goto error; } for (j0 = 0; j0 < (image->npxi); ++j0) { image->vectord[j0] = (image->vectord[j0]) + addend; } ok: status = 0; goto bye; error: mxp_errmsg_append_f3 (mxfunc, status, ""); goto bye; bye: return (status); } /* end-of-file */