Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Image* make_image(int width, int height, int bytes_per_pixel) {
- // todo: implement
- if (width == 0 || height == 0) return NULL;
- Image* i = xmalloc(sizeof(Image));
- i->width = width;
- i->height = height;
- i->bytes_per_pixel = bytes_per_pixel;
- i->data = xmalloc(sizeof(Byte) * bytes_per_pixel * width * height);
- clear_image(i);
- return i;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement