stb_image

作者: 程序员都是傻子呀 | 来源:发表于2020-04-17 20:21 被阅读0次
#include <stdio.h>
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"

int main(int argc, const char * argv[]) {
    int width, height, nrChannels;
    unsigned char *data = stbi_load("test.jpg", &width, &height, &nrChannels, 0);
    printf("w %d, h %d, c %d\n", width, height, nrChannels);
    
    return 0;
}

相关文章

网友评论

      本文标题:stb_image

      本文链接:https://www.haomeiwen.com/subject/xpduvhtx.html