imng_p->rowbuf = (unsigned char*)nsMemory::Alloc(CHANNELS*width);
imng_p->rowbuf = (unsigned char*)nsMemory::Alloc(imng_p->channels*width);
il_mng_processheader(mng_handle handle, mng_uint32 width, mng_uint32 height){  EXTRACT_STRUCTS;  imng_p->width = width;  imng_p->height = height;  ic->src_header->width = width;  ic->src_header->height = height;#ifndef NO_ALPHA  if (mng_get_simplicity(handle) & MNG_SIMPLICITY_TRANSPARENCY) {    dprintf((stderr, "--- MNG ALPHA 8-BIT\n"));    ic->image->header.alpha_bits = 8;  } else {    dprintf((stderr, "--- MNG ALPHA THRESHHOLD\n"));    ic->image->header.alpha_bits = 1;  }  ic->image->header.alpha_shift = 0;  ic->image->header.is_interleaved_alpha = TRUE;#endif  imng_p->image =    (unsigned char*)nsMemory::Alloc(CHANNELS*width*height);  memset(imng_p->image, 0, CHANNELS*width*height);  imng_p->rowbuf = (unsigned char*)nsMemory::Alloc(CHANNELS*width);  ic->imgdcb->ImgDCBImageSize();  ic->imgdcb->ImgDCBSetupColorspaceConverter();   return MNG_TRUE;}