📄 image.c
字号:
#include <stdio.h>#include "image.h"struct image *image_new(int width, int height){ struct image *img = (struct image*)malloc(sizeof(struct image)); if(img) { img->width = width; img->height = height; img->bufsize = width*height*3; img->buf = (char *)malloc(img->bufsize); if(!img->bufsize) { free(img); img = NULL; } } return img;}void image_delete(struct image *img){ free(img->buf);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -