X-Git-Url: http://git.imager.perl.org/imager.git/blobdiff_plain/ddffecaef90bda7024f0797cc81ab4d5af159560..0df260f60c8082b80dff18eed8b251826b58ca74:/img8.c diff --git a/img8.c b/img8.c index c64a4cee..391af02e 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; @@ -108,41 +107,6 @@ im_img_8_new(pIMCTX, i_img_dim x,i_img_dim y,int ch) { return im; } -#if 0 -/* -=item i_img_new() - -Create new image reference - notice that this isn't an object yet and -this should be fixed asap. - -=cut -*/ - - -i_img * -i_img_new() { - i_img *im; - - mm_log((1,"i_img_struct()\n")); - - im = i_img_alloc(); - - *im = IIM_base_8bit_direct; - im->xsize=0; - im->ysize=0; - im->channels=3; - im->ch_mask=MAXINT; - im->bytes=0; - im->idata=NULL; - - i_img_init(im); - - mm_log((1,"(%p) <- i_img_struct\n",im)); - return im; -} - -#endif - /* =item i_img_empty(im, x, y) @@ -209,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;