bm->height = h;
bm->stride = BM_BYTES_PER_LINE(bm);
if(h && bm->stride)
- bm->data = (BmUnit *)xcalloc(h, bm->stride);
+ bm->data = (BmUnit *)mdvi_calloc(h, bm->stride);
else
bm->data = NULL;
bm->height = h;
bm->stride = BM_BYTES_PER_LINE(bm);
if(h && bm->stride)
- bm->data = (BmUnit *)xmalloc(h * bm->stride);
+ bm->data = (BmUnit *)mdvi_malloc(h * bm->stride);
else
bm->data = NULL;
nb.width = bm->width;
nb.height = bm->height;
nb.stride = bm->stride;
- nb.data = xcalloc(bm->height, bm->stride);
+ nb.data = mdvi_calloc(bm->height, bm->stride);
fptr = bm->data;
tptr = __bm_unit_ptr(&nb, nb.width-1, 0);
}
DEBUG((DBG_BITMAP_OPS, "flip_horizontally (%d,%d) -> (%d,%d)\n",
bm->width, bm->height, nb.width, nb.height));
- xfree(bm->data);
+ mdvi_free(bm->data);
bm->data = nb.data;
if(SHOW_OP_DATA)
bitmap_print(stderr, bm);
nb.width = bm->width;
nb.height = bm->height;
nb.stride = bm->stride;
- nb.data = xcalloc(bm->height, bm->stride);
+ nb.data = mdvi_calloc(bm->height, bm->stride);
fptr = bm->data;
tptr = __bm_unit_ptr(&nb, 0, nb.height-1);
}
DEBUG((DBG_BITMAP_OPS, "flip_vertically (%d,%d) -> (%d,%d)\n",
bm->width, bm->height, nb.width, nb.height));
- xfree(bm->data);
+ mdvi_free(bm->data);
bm->data = nb.data;
if(SHOW_OP_DATA)
bitmap_print(stderr, bm);
nb.width = bm->width;
nb.height = bm->height;
nb.stride = bm->stride;
- nb.data = xcalloc(bm->height, bm->stride);
+ nb.data = mdvi_calloc(bm->height, bm->stride);
fptr = bm->data;
tptr = __bm_unit_ptr(&nb, nb.width-1, nb.height-1);
}
DEBUG((DBG_BITMAP_OPS, "flip_diagonally (%d,%d) -> (%d,%d)\n",
bm->width, bm->height, nb.width, nb.height));
- xfree(bm->data);
+ mdvi_free(bm->data);
bm->data = nb.data;
if(SHOW_OP_DATA)
bitmap_print(stderr, bm);
nb.width = bm->height;
nb.height = bm->width;
nb.stride = BM_BYTES_PER_LINE(&nb);
- nb.data = xcalloc(nb.height, nb.stride);
+ nb.data = mdvi_calloc(nb.height, nb.stride);
fptr = bm->data;
tptr = __bm_unit_ptr(&nb, nb.width - 1, 0);
DEBUG((DBG_BITMAP_OPS, "rotate_clockwise (%d,%d) -> (%d,%d)\n",
bm->width, bm->height, nb.width, nb.height));
- xfree(bm->data);
+ mdvi_free(bm->data);
bm->data = nb.data;
bm->width = nb.width;
bm->height = nb.height;
nb.width = bm->height;
nb.height = bm->width;
nb.stride = BM_BYTES_PER_LINE(&nb);
- nb.data = xcalloc(nb.height, nb.stride);
+ nb.data = mdvi_calloc(nb.height, nb.stride);
fptr = bm->data;
tptr = __bm_unit_ptr(&nb, 0, nb.height - 1);
DEBUG((DBG_BITMAP_OPS, "rotate_counter_clockwise (%d,%d) -> (%d,%d)\n",
bm->width, bm->height, nb.width, nb.height));
- xfree(bm->data);
+ mdvi_free(bm->data);
bm->data = nb.data;
bm->width = nb.width;
bm->height = nb.height;
nb.width = bm->height;
nb.height = bm->width;
nb.stride = BM_BYTES_PER_LINE(&nb);
- nb.data = xcalloc(nb.height, nb.stride);
+ nb.data = mdvi_calloc(nb.height, nb.stride);
fptr = bm->data;
tptr = __bm_unit_ptr(&nb, nb.width-1, nb.height-1);
}
DEBUG((DBG_BITMAP_OPS, "flip_rotate_clockwise (%d,%d) -> (%d,%d)\n",
bm->width, bm->height, nb.width, nb.height));
- xfree(bm->data);
+ mdvi_free(bm->data);
bm->data = nb.data;
bm->width = nb.width;
bm->height = nb.height;
nb.width = bm->height;
nb.height = bm->width;
nb.stride = BM_BYTES_PER_LINE(&nb);
- nb.data = xcalloc(nb.height, nb.stride);
+ nb.data = mdvi_calloc(nb.height, nb.stride);
fptr = bm->data;
tptr = nb.data;
DEBUG((DBG_BITMAP_OPS, "flip_rotate_counter_clockwise (%d,%d) -> (%d,%d)\n",
bm->width, bm->height, nb.width, nb.height));
- xfree(bm->data);
+ mdvi_free(bm->data);
bm->data = nb.data;
bm->width = nb.width;
bm->height = nb.height;