X-Git-Url: http://git.imager.perl.org/imager.git/blobdiff_plain/a0349ca2394ecb6a18f7be70e02b9389a873bf9a..3063ecbb7e74c693653fa31ca5974892946d1f64:/img8.c diff --git a/img8.c b/img8.c index 29e9700a..2893a486 100644 --- a/img8.c +++ b/img8.c @@ -82,10 +82,10 @@ static i_img IIM_base_8bit_direct = }*/ /* -=item i_img_8_new(x, y, ch) - +=item im_img_8_new(ctx, x, y, ch) +XX =category Image creation/destruction - +=synopsis i_img *img = im_img_8_new(aIMCTX, width, height, channels); =synopsis i_img *img = i_img_8_new(width, height, channels); Creates a new image object I pixels wide, and I pixels high with @@ -94,7 +94,6 @@ I channels. =cut */ - i_img * im_img_8_new(pIMCTX, i_img_dim x,i_img_dim y,int ch) { i_img *im; @@ -174,10 +173,10 @@ im_img_empty_ch(pIMCTX, i_img *im,i_img_dim x,i_img_dim y,int ch) { im->xsize = x; im->ysize = y; im->channels = ch; - im->ch_mask = MAXINT; + im->ch_mask = ~0U; im->bytes=bytes; if ( (im->idata=mymalloc(im->bytes)) == NULL) - i_fatal(2,"malloc() error\n"); + im_fatal(aIMCTX, 2,"malloc() error\n"); memset(im->idata,0,(size_t)im->bytes); im->ext_data = NULL; @@ -228,7 +227,7 @@ Internal function. This is the function kept in the i_f_gpix member of an i_img object. It does normal retrieval of a pixel from the image with range checking. -Returns 0 if the pixel could be set, -1 otherwise. +Returns 0 if the pixel could be retrieved, -1 otherwise. =cut */