{"id":57769,"date":"2025-08-15T19:30:35","date_gmt":"2025-08-15T11:30:35","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/57769.html"},"modified":"2025-08-15T19:30:35","modified_gmt":"2025-08-15T11:30:35","slug":"linux%e9%ab%98%e7%ba%a7%e7%bc%96%e7%a8%8b-framebuffer","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/57769.html","title":{"rendered":"Linux\u9ad8\u7ea7\u7f16\u7a0b-framebuffer"},"content":{"rendered":"<h2>1.framebuffer\u6982\u5ff5<\/h2>\n<p>UI\u6280\u672f&#xff1a;User interface \u00a0<\/p>\n<p>framebuffer&#xff1a;\u5e27\u7f13\u51b2\u3001\u5e27\u7f13\u5b58\u6280\u672f<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Linux\u5185\u6838\u4e13\u95e8\u4e3a\u56fe\u5f62\u5316\u663e\u793a\u63d0\u4f9b\u7684\u4e00\u5957\u5e94\u7528\u7a0b\u5e8f\u63a5\u53e3\u3002<\/p>\n<h2>2.\u57fa\u672c\u64cd\u4f5c<\/h2>\n<h3>&#xff08;1&#xff09;\u64cd\u4f5c\u6b65\u9aa4<\/h3>\n<p>1. \u6253\u5f00\u663e\u793a\u8bbe\u5907(\/dev\/fb0)<br \/>\n2. \u83b7\u53d6\u663e\u793a\u8bbe\u5907\u76f8\u5173\u53c2\u6570&#xff08;\u5206\u8fa8\u7387&#xff0c;\u50cf\u7d20\u683c\u5f0f&#xff09;&#8212;\u300bioctl<br \/>\n3. \u5efa\u7acb\u663e\u5b58\u7a7a\u95f4\u548c\u7528\u6237\u7a7a\u95f4\u7684\u5185\u5b58\u6620\u5c04<br \/>\n4. \u5411\u6620\u5c04\u7684\u7528\u6237\u7a7a\u95f4\u5199\u5165RGB\u989c\u8272\u503c<br \/>\n5. \u89e3\u9664\u6620\u5c04\u5173\u7cfb<br \/>\n6. \u5173\u95ed\u663e\u793a\u8bbe\u5907<\/p>\n<h3>&#xff08;2&#xff09;\u51fd\u6570\u63a5\u53e3<\/h3>\n<p>int init_fb(char *devname)<br \/>\n{<br \/>\n    \/\/1. \u6253\u5f00\u663e\u793a\u8bbe\u5907(\/dev\/fb0)<br \/>\n    fb &#061; open(devname, O_RDWR);<br \/>\n    if (-1 &#061;&#061; fb)<br \/>\n    {<br \/>\n        perror(&#034;open fb error&#034;);<br \/>\n        return -1;<br \/>\n    }<\/p>\n<p>    \/\/2. \u83b7\u53d6\u663e\u793a\u8bbe\u5907\u76f8\u5173\u53c2\u6570&#xff08;\u5206\u8fa8\u7387&#xff0c;\u50cf\u7d20\u683c\u5f0f&#xff09;<\/p>\n<p>    int ret &#061; ioctl(fb, FBIOGET_VSCREENINFO, &amp;vinfo);<br \/>\n    if (ret &lt; 0)<br \/>\n    {<br \/>\n        perror(&#034;ioctl error&#034;);<br \/>\n        return -1;<br \/>\n    }<\/p>\n<p>    printf(&#034;xres &#061; %d, yres &#061; %d\\\\n&#034;, vinfo.xres, vinfo.yres);<br \/>\n    printf(&#034;xres_virtual &#061; %d, yres_virtual &#061; %d\\\\n&#034;, vinfo.xres_virtual, vinfo.yres_virtual);<br \/>\n    printf(&#034;bits_per_pixel &#061; %d\\\\n&#034;, vinfo.bits_per_pixel);<\/p>\n<p>    \/\/3. \u5efa\u7acb\u663e\u5b58\u7a7a\u95f4\u548c\u7528\u6237\u7a7a\u95f4\u7684\u5185\u5b58\u6620\u5c04<br \/>\n    size_t len &#061; vinfo.xres_virtual * vinfo.yres_virtual * vinfo.bits_per_pixel\/8;<br \/>\n    pmem &#061; mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_SHARED, fb, 0);<br \/>\n    if (pmem &#061;&#061; MAP_FAILED)<br \/>\n    {<br \/>\n        perror(&#034;mmap error&#034;);<br \/>\n        return -1;<br \/>\n    }<\/p>\n<p>    return 0;<br \/>\n}<\/p>\n<p>void *mmap(void *addr, size_t length, int prot, int flags,int fd, off_t offset);<br \/>\n\u529f\u80fd&#xff1a;\u5efa\u7acb\u5185\u5b58\u6620\u5c04<br \/>\n\u53c2\u6570&#xff1a;<br \/>\n\u00a0 \u00a0 \u00a0 addr &#xff1a;\u6620\u5c04\u7684\u7528\u6237\u7a7a\u95f4\u9996\u5730\u5740 \u00a0<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 NULL&#xff1a;\u8ba9\u64cd\u4f5c\u7cfb\u7edf\u81ea\u5df1\u5206\u914d\u7528\u6237\u7a7a\u95f4<br \/>\n\u00a0 \u00a0 \u00a0 length&#xff1a;\u8981\u6620\u5c04\u7684\u7a7a\u95f4\u5927\u5c0f<br \/>\n\u00a0 \u00a0 \u00a0 prot&#xff1a; \u64cd\u4f5c\u6743\u9650<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0PROT_READ \u00a0Pages may be read.<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0PROT_WRITE Pages may be written<br \/>\n\u00a0 \u00a0 \u00a0flag &#xff1a; MAP_SHARED<br \/>\n\u00a0 \u00a0 \u00a0fd&#xff1a;\u663e\u793a\u8bbe\u5907\u6587\u4ef6\u63cf\u8ff0\u7b26<br \/>\n\u00a0 \u00a0 \u00a0offset&#xff1a;\u504f\u79fb\u91cf<br \/>\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a00&#xff1a;\u4ece\u663e\u5b58\u5f00\u5934\u6620\u5c04<br \/>\n\u8fd4\u56de\u503c&#xff1a;<br \/>\n\u00a0 \u00a0 \u00a0 \u6210\u529f&#xff1a;\u6620\u5c04\u7684\u7528\u6237\u7a7a\u95f4\u9996\u5730\u5740<br \/>\n\u00a0 \u00a0 \u00a0 \u5931\u8d25&#xff1a;MAP_FAILED&#xff08;&#xff08;void *&#xff09;-1&#xff09;<\/p>\n<p>int uninit_fb()<br \/>\n{<br \/>\n    \/\/5. \u89e3\u9664\u6620\u5c04\u5173\u7cfb<br \/>\n    \/\/6. \u5173\u95ed\u663e\u793a\u8bbe\u5907<br \/>\n    size_t len &#061; vinfo.xres_virtual * vinfo.yres_virtual * vinfo.bits_per_pixel\/8;<br \/>\n    munmap(pmem, len);<br \/>\n    close(fb);<\/p>\n<p>}<\/p>\n<h2>3.\u57fa\u672c\u7b97\u6cd5\u5b9e\u73b0<\/h2>\n<h3>&#xff08;1&#xff09;\u753b\u4e00\u4e2a\u70b9<\/h3>\n<p>void draw_point(int x, int y, unsigned int col)<br \/>\n{<br \/>\n    if (x &gt;&#061; vinfo.xres || y &gt;&#061; vinfo.yres)<br \/>\n    {<br \/>\n        return ;<br \/>\n    }<br \/>\n    if (vinfo.bits_per_pixel &#061;&#061; RGB_FMT_888)<br \/>\n    {<br \/>\n        unsigned int *p &#061; pmem;<br \/>\n        *(p&#043;vinfo.xres_virtual*y&#043;x) &#061; col;<br \/>\n    }<br \/>\n    else if (vinfo.bits_per_pixel &#061;&#061; RGB_FMT_565)<br \/>\n    {<br \/>\n        unsigned short *p &#061; pmem;<br \/>\n        *(p&#043;vinfo.xres_virtual*y&#043;x) &#061; col;<br \/>\n    }<br \/>\n}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u7b97\u6cd5\u601d\u60f3&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u8fb9\u754c\u68c0\u67e5&#xff1a;\u9996\u5148\u68c0\u67e5\u5750\u6807 (x, y) \u662f\u5426\u5728\u5c4f\u5e55\u6709\u6548\u8303\u56f4\u5185&#xff08;x &lt; vinfo.xres \u4e14 y &lt; vinfo.yres&#xff09;&#xff0c;\u82e5\u8d8a\u754c\u5219\u76f4\u63a5\u8fd4\u56de\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u50cf\u7d20\u683c\u5f0f\u5904\u7406&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u82e5\u4e3a 32\u4f4dRGB888\u683c\u5f0f&#xff08;RGB_FMT_888&#xff09;&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5c06\u663e\u5b58\u6307\u9488 pmem \u8f6c\u6362\u4e3a unsigned int* \u7c7b\u578b\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u8ba1\u7b97\u76ee\u6807\u50cf\u7d20\u7684\u7ebf\u6027\u5730\u5740&#xff1a;pmem &#043; vinfo.xres_virtual * y &#043; x\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5c06\u989c\u8272\u503c col \u76f4\u63a5\u5199\u5165\u8be5\u5730\u5740\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u82e5\u4e3a 16\u4f4dRGB565\u683c\u5f0f&#xff08;RGB_FMT_565&#xff09;&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5c06\u663e\u5b58\u6307\u9488 pmem \u8f6c\u6362\u4e3a unsigned short* \u7c7b\u578b\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u8ba1\u7b97\u76ee\u6807\u50cf\u7d20\u7684\u7ebf\u6027\u5730\u5740&#xff1a;pmem &#043; vinfo.xres_virtual * y &#043; x\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5c06\u989c\u8272\u503c col&#xff08;\u9700\u786e\u4fdd\u662f16\u4f4d&#xff09;\u5199\u5165\u8be5\u5730\u5740\u3002<\/p>\n<h3>&#xff08;2&#xff09;\u753b\u4e00\u6761\u6a2a\u7ebf<\/h3>\n<p>void draw_x_line(int x, int y, int end, unsigned int col)<br \/>\n{<br \/>\n    for(int i &#061; 0; i &lt; end; &#043;&#043;i)<br \/>\n    {<br \/>\n        draw_point((x &#043; i), y, col);<br \/>\n    }<br \/>\n}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u7b97\u6cd5\u601d\u60f3&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6c34\u5e73\u7ebf\u7ed8\u5236&#xff1a;\u4ece\u8d77\u70b9 (x, y) \u5f00\u59cb&#xff0c;\u5411\u53f3\u8fde\u7eed\u7ed8\u5236 end \u4e2a\u50cf\u7d20\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5faa\u73af\u63a7\u5236&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u521d\u59cb\u5316\u8ba1\u6570\u5668 i &#061; 0\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5faa\u73af\u6761\u4ef6 i &lt; end&#xff0c;\u6bcf\u6b21\u8fed\u4ee3\u8c03\u7528 draw_point(x &#043; i, y, col) \u7ed8\u5236\u4e00\u4e2a\u50cf\u7d20\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5faa\u73af\u7ed3\u675f\u540e&#xff0c;\u5f62\u6210\u4e00\u6761\u4ece (x, y) \u5230 (x &#043; end &#8211; 1, y) \u7684\u6c34\u5e73\u7ebf\u6bb5\u3002<\/p>\n<h3>&#xff08;3&#xff09;\u753b\u4e00\u6761\u7ad6\u7ebf<\/h3>\n<p>void draw_y_line(int x, int y, int end, unsigned int col)<br \/>\n{<br \/>\n    for(int i &#061; 0; i &lt; end; &#043;&#043;i)<br \/>\n    {<br \/>\n        draw_point(x, (y &#043; i), col);<br \/>\n    }<br \/>\n}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u7b97\u6cd5\u601d\u60f3&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5782\u76f4\u7ebf\u7ed8\u5236&#xff1a;\u4ece\u8d77\u70b9 (x, y) \u5f00\u59cb&#xff0c;\u5411\u4e0b\u8fde\u7eed\u7ed8\u5236 end \u4e2a\u50cf\u7d20\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5faa\u73af\u63a7\u5236&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u521d\u59cb\u5316\u8ba1\u6570\u5668 i &#061; 0\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5faa\u73af\u6761\u4ef6 i &lt; end&#xff0c;\u6bcf\u6b21\u8fed\u4ee3\u8c03\u7528 draw_point(x, y &#043; i, col) \u7ed8\u5236\u4e00\u4e2a\u50cf\u7d20\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5faa\u73af\u7ed3\u675f\u540e&#xff0c;\u5f62\u6210\u4e00\u6761\u4ece (x, y) \u5230 (x, y &#043; end &#8211; 1) \u7684\u5782\u76f4\u7ebf\u6bb5\u3002<\/p>\n<h3>&#xff08;4&#xff09;\u753b\u4e00\u4e2a\u77e9\u5f62<\/h3>\n<p>void draw_rect(int x, int y, int weight, int high, unsigned int col)<br \/>\n{<br \/>\n    draw_x_line(x, y, weight, col);<br \/>\n    draw_x_line(x, (y &#043; high), weight, col);<br \/>\n    draw_y_line(x, y, high, col);<br \/>\n    draw_y_line((x &#043; weight), y, high, col);<br \/>\n}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u7b97\u6cd5\u601d\u60f3&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u77e9\u5f62\u8fb9\u6846\u7ed8\u5236&#xff1a;\u901a\u8fc7\u7ec4\u5408\u56db\u6761\u8fb9\u5b8c\u6210\u77e9\u5f62\u7ed8\u5236&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u4e0a\u8fb9&#xff1a;\u8c03\u7528 draw_x_line(x, y, weight, col)\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u4e0b\u8fb9&#xff1a;\u8c03\u7528 draw_x_line(x, y &#043; high, weight, col)\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5de6\u8fb9&#xff1a;\u8c03\u7528 draw_y_line(x, y, high, col)\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u53f3\u8fb9&#xff1a;\u8c03\u7528 draw_y_line(x &#043; weight, y, high, col)\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6ce8\u610f&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6b64\u51fd\u6570\u4ec5\u7ed8\u5236\u77e9\u5f62\u8fb9\u6846&#xff0c;\u4e0d\u586b\u5145\u5185\u90e8\u3002<\/p>\n<h3>&#xff08;5&#xff09;\u753b\u4e00\u4e2a\u5706<\/h3>\n<p>void draw_Circle(int x, int y, int r, unsigned int col)<br \/>\n{<br \/>\n    int x0 &#061; 0;<br \/>\n    int y0 &#061; 0;<br \/>\n    int si &#061; 0;<\/p>\n<p>    for (si &#061; 0; si &lt;&#061; 360; si&#043;&#043;)<br \/>\n    {<br \/>\n        x0 &#061; r * sin(PI * 2 \/ 360 * si) &#043; x;<br \/>\n        y0 &#061; r * cos(PI * 2 \/ 360 * si) &#043; y;<\/p>\n<p>        draw_point(x0, y0, col);<br \/>\n    }<br \/>\n}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u7b97\u6cd5\u601d\u60f3&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u53c2\u6570\u5316\u5706\u7ed8\u5236&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u904d\u5386\u89d2\u5ea6 si \u4ece 0\u00b0 \u5230 360\u00b0&#xff0c;\u6b65\u957f\u4e3a 1\u00b0\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5bf9\u6bcf\u4e2a\u89d2\u5ea6 si&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u8ba1\u7b97\u5706\u4e0a\u70b9\u7684\u5750\u6807&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">x0 &#061; r * sin(\u03b8) &#043; x&#xff08;\u03b8 &#061; PI * 2 \/ 360 * si \u5f27\u5ea6&#xff09;\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">y0 &#061; r * cos(\u03b8) &#043; y\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u8c03\u7528 draw_point(x0, y0, col) \u7ed8\u5236\u5355\u4e2a\u50cf\u7d20\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6548\u679c&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u901a\u8fc7\u79bb\u6563\u70b9\u8fd1\u4f3c\u5f62\u6210\u4e00\u4e2a\u5706\u5f62&#xff0c;\u7cbe\u5ea6\u53d6\u51b3\u4e8e\u89d2\u5ea6\u6b65\u957f\u3002<\/p>\n<h3>&#xff08;6&#xff09;\u753b\u4e00\u4e2a\u56fe<\/h3>\n<p>int get_bmp_head_info(const char *bmpname, Bmp_file_head_t *pheadinfo, Bmp_info_t *pbmpinfo)<br \/>\n{<br \/>\nFILE *fp &#061; fopen(bmpname, &#034;r&#034;);<br \/>\nif (NULL &#061;&#061; fp)<br \/>\n{<br \/>\nperror(&#034;fopen error&#034;);<br \/>\nreturn -1;<br \/>\n}<\/p>\n<p>fread(pheadinfo, sizeof(Bmp_file_head_t), 1, fp);<br \/>\nfread(pbmpinfo, sizeof(Bmp_info_t), 1, fp);<\/p>\n<p>fclose(fp);<\/p>\n<p>return 0;<br \/>\n}<\/p>\n<p>void draw_bmp(int x, int y, char *bmpname)<br \/>\n{<br \/>\n    Bmp_file_head_t headinfo;<br \/>\nBmp_info_t bmpinfo;<\/p>\n<p>get_bmp_head_info(bmpname, &amp;headinfo, &amp;bmpinfo);<\/p>\n<p>    int fd &#061; open(bmpname, O_RDONLY);<br \/>\n    if (-1 &#061;&#061; fd)<br \/>\n    {<br \/>\n        perror(&#034;open bmp error&#034;);<br \/>\n        return ;<br \/>\n    }<br \/>\n    lseek(fd, 54, SEEK_SET);<br \/>\n    unsigned char *buff &#061; malloc(bmpinfo.biHeight*bmpinfo.biWidth*bmpinfo.biBitCount\/8);<br \/>\n    read(fd, buff, bmpinfo.biHeight*bmpinfo.biWidth*bmpinfo.biBitCount\/8);<br \/>\n    close(fd);<\/p>\n<p>    unsigned char *p &#061; buff;<br \/>\n    unsigned char r, g, b;<\/p>\n<p>    for (int j &#061; bmpinfo.biHeight-1; j &gt;&#061; 0; j&#8211;)<br \/>\n    {<br \/>\n        for (int i &#061; 0; i &lt; bmpinfo.biWidth; i&#043;&#043;)<br \/>\n        {<br \/>\n            b &#061; *p;&#043;&#043;p;<br \/>\n            g &#061; *p;&#043;&#043;p;<br \/>\n            r &#061; *p;&#043;&#043;p;<br \/>\n             if (vinfo.bits_per_pixel &#061;&#061; RGB_FMT_888)<br \/>\n             {<br \/>\n                unsigned int col &#061; (r &lt;&lt; 16) | (g &lt;&lt; 8) | (b &lt;&lt; 0);<br \/>\n                draw_point(i&#043;x, j&#043;y, col);<br \/>\n             }<br \/>\n             else if  (vinfo.bits_per_pixel &#061;&#061; RGB_FMT_565)<br \/>\n             {<br \/>\n                unsigned short col &#061; ((r &gt;&gt; 3) &lt;&lt; 11) | ((g &gt;&gt; 2) &lt;&lt; 5) | (b &gt;&gt; 3);<br \/>\n                draw_point(i&#043;x, j&#043;y, col);<br \/>\n             }<br \/>\n        }<\/p>\n<p>    }<\/p>\n<p>    free(buff);<\/p>\n<p>}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">get_bmp_head_info(const char *bmpname, Bmp_file_head_t *pheadinfo, Bmp_info_t *pbmpinfo)<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u7b97\u6cd5\u601d\u60f3&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6587\u4ef6\u64cd\u4f5c&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u4ee5\u53ea\u8bfb\u6a21\u5f0f\u6253\u5f00BMP\u6587\u4ef6&#xff0c;\u5931\u8d25\u65f6\u8fd4\u56de\u9519\u8bef\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5934\u4fe1\u606f\u8bfb\u53d6&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u4f7f\u7528 fread \u8bfb\u53d6BMP\u6587\u4ef6\u5934&#xff08;Bmp_file_head_t&#xff09;\u5230 pheadinfo\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u7ee7\u7eed\u8bfb\u53d6BMP\u4fe1\u606f\u5934&#xff08;Bmp_info_t&#xff09;\u5230 pbmpinfo\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u8d44\u6e90\u91ca\u653e&#xff1a;\u5173\u95ed\u6587\u4ef6\u53e5\u67c4&#xff0c;\u8fd4\u56de\u6210\u529f\u72b6\u6001\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">draw_bmp(int x, int y, char *bmpname)<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u7b97\u6cd5\u601d\u60f3&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5934\u4fe1\u606f\u89e3\u6790&#xff1a;\u8c03\u7528 get_bmp_head_info \u83b7\u53d6BMP\u7684\u5bbd\u3001\u9ad8\u3001\u4f4d\u6df1\u7b49\u4fe1\u606f\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u50cf\u7d20\u6570\u636e\u52a0\u8f7d&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6253\u5f00\u6587\u4ef6\u5e76\u8df3\u8fc754\u5b57\u8282\u7684\u6587\u4ef6\u5934\u548c\u4fe1\u606f\u5934\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6839\u636eBMP\u4fe1\u606f\u5934\u4e2d\u7684\u56fe\u50cf\u5c3a\u5bf8\u548c\u4f4d\u6df1&#xff08;\u5982 biWidth \u00d7 biHeight \u00d7 biBitCount\/8&#xff09;&#xff0c;\u5206\u914d\u7f13\u51b2\u533a buff \u5e76\u8bfb\u53d6\u50cf\u7d20\u6570\u636e\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u50cf\u7d20\u7ed8\u5236&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">BMP\u50cf\u7d20\u987a\u5e8f&#xff1a;BMP\u6587\u4ef6\u5b58\u50a8\u987a\u5e8f\u4e3a\u4ece\u4e0b\u5230\u4e0a&#xff0c;\u9700\u53cd\u5411\u904d\u5386\u884c&#xff08;j \u4ece biHeight-1 \u5230 0&#xff09;\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u989c\u8272\u8f6c\u6362&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5bf9\u4e8e RGB888\u683c\u5f0f\u5c4f\u5e55&#xff1a;\u5c06BGR\u50cf\u7d20\u6570\u636e&#xff08;BMP\u683c\u5f0f&#xff09;\u8f6c\u6362\u4e3aRGB888&#xff0c;\u5408\u5e76\u4e3a unsigned int \u540e\u8c03\u7528 draw_point\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5bf9\u4e8e RGB565\u683c\u5f0f\u5c4f\u5e55&#xff1a;\u5c06RGB\u5206\u91cf\u538b\u7f29\u4e3a5-6-5\u4f4d&#xff0c;\u5408\u5e76\u4e3a unsigned short\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u7ed8\u5236\u6bcf\u4e2a\u50cf\u7d20\u5230\u5c4f\u5e55\u5750\u6807 (x &#043; i, y &#043; j)\u3002<\/p>\n<h3>&#xff08;7&#xff09;\u5728\u56fe\u4e2d\u52a0\u5165\u5b57&#xff08;\u4f7f\u7528\u5b57\u6a21&#xff09;<\/h3>\n<p>void draw_word(int x, int y, unsigned char *pword, int w, int h, unsigned int col)<br \/>\n{<br \/>\n    for (int j &#061; 0; j &lt; h; j&#043;&#043;)<br \/>\n    {<br \/>\n        for (int i &#061; 0; i &lt; w; i&#043;&#043;)<br \/>\n        {<br \/>\n            unsigned char tmp &#061; pword[i&#043;j*w];<br \/>\n            for (int k &#061; 0; k &lt; 8; k&#043;&#043;)<br \/>\n            {<br \/>\n                if (tmp &amp; 0x80)<br \/>\n                {<br \/>\n                    draw_point(x&#043;i*8&#043;k, y&#043;j, col);<br \/>\n                }<br \/>\n                else<br \/>\n                {<\/p>\n<p>                }<br \/>\n                tmp &#061; tmp &lt;&lt; 1;<br \/>\n            }<br \/>\n        }<\/p>\n<p>    }<br \/>\n}<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u7b97\u6cd5\u601d\u60f3&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5b57\u6a21\u6570\u636e\u89e3\u6790&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5b57\u6a21\u6570\u636e pword \u4e3a w \u00d7 h \u7684\u5b57\u8282\u6570\u7ec4&#xff0c;\u6bcf\u4e2a\u5b57\u8282\u8868\u793a8\u4e2a\u6c34\u5e73\u50cf\u7d20\u70b9&#xff08;1\u4f4d1\u50cf\u7d20&#xff09;\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u9010\u884c\u9010\u50cf\u7d20\u7ed8\u5236&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5916\u5c42\u5faa\u73af\u904d\u5386\u884c&#xff08;j \u4ece 0 \u5230 h-1&#xff09;\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5185\u5c42\u5faa\u73af\u904d\u5386\u5217&#xff08;i \u4ece 0 \u5230 w-1&#xff09;&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u83b7\u53d6\u5f53\u524d\u5b57\u8282 tmp &#061; pword[i &#043; j * w]\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5bf9\u5b57\u8282\u76848\u4e2a\u4f4d&#xff08;\u4ece\u9ad8\u4f4d\u5230\u4f4e\u4f4d&#xff09;&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u82e5\u67d0\u4f4d\u4e3a 1&#xff0c;\u8c03\u7528 draw_point(x &#043; i*8 &#043; k, y &#043; j, col) \u7ed8\u5236\u50cf\u7d20\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u82e5\u4e3a 0&#xff0c;\u8df3\u8fc7&#xff08;\u900f\u660e\u6216\u80cc\u666f&#xff09;\u3002<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u6548\u679c&#xff1a;<\/p>\n<p style=\"margin-left:.0001pt;margin-right:0;text-align:justify\">\u5c061\u4f4d\u5b57\u6a21\u6570\u636e\u6309\u6307\u5b9a\u989c\u8272\u5c55\u5f00\u4e3a8\u500d\u5bbd\u5ea6\u7684\u5b57\u7b26\u56fe\u5f62\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb558\u6b21\uff0c\u70b9\u8d5e27\u6b21\uff0c\u6536\u85cf19\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86Linux\u5e27\u7f13\u51b2(Framebuffer)\u6280\u672f\u53ca\u5176\u56fe\u5f62\u7ed8\u5236\u5b9e\u73b0\u3002\u4e3b\u8981\u5185\u5bb9\u5305\u62ec\uff1a1) Framebuffer\u6982\u5ff5\u53ca\u64cd\u4f5c\u6b65\u9aa4\uff1a\u6253\u5f00\u8bbe\u5907\u3001\u83b7\u53d6\u53c2\u6570\u3001\u5185\u5b58\u6620\u5c04\u3001\u5199\u5165\u989c\u8272\u503c\u7b49\uff1b2) \u57fa\u672c\u7ed8\u56fe\u51fd\u6570\u5b9e\u73b0\uff1a\u5305\u62ec\u753b\u70b9\u3001\u6a2a\u7ebf\u3001\u7ad6\u7ebf\u3001\u77e9\u5f62\u3001\u5706\u7b49\u7b97\u6cd5\uff1b3) \u56fe\u50cf\u5904\u7406\uff1aBMP\u6587\u4ef6\u5934\u89e3\u6790\u548c\u50cf\u7d20\u7ed8\u5236\uff1b4) \u6587\u5b57\u663e\u793a\uff1a\u901a\u8fc7\u5b57\u6a21\u6570\u636e\u5b9e\u73b0\u5b57\u7b26\u6e32\u67d3\u3002\u5173\u952e\u70b9\u5728\u4e8e\u901a\u8fc7mmap\u6620\u5c04\u663e\u5b58\u540e\u76f4\u63a5\u64cd\u4f5c\u50cf\u7d20\u6570\u636e\uff0c\u652f\u6301RGB888\u548cRGB565\u4e24\u79cd\u683c\u5f0f\uff0c\u5e76\u63d0\u4f9b\u4e86\u4ece\u7b80\u5355\u56fe\u5f62\u5230\u590d\u6742\u56fe\u50cf\u3001\u6587\u5b57\u7ed8\u5236\u7684\u5b8c\u6574\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,43,44],"topic":[],"class_list":["post-57769","post","type-post","status-publish","format-standard","hentry","category-server","tag-linux","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux\u9ad8\u7ea7\u7f16\u7a0b-framebuffer - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/57769.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux\u9ad8\u7ea7\u7f16\u7a0b-framebuffer - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb558\u6b21\uff0c\u70b9\u8d5e27\u6b21\uff0c\u6536\u85cf19\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86Linux\u5e27\u7f13\u51b2(Framebuffer)\u6280\u672f\u53ca\u5176\u56fe\u5f62\u7ed8\u5236\u5b9e\u73b0\u3002\u4e3b\u8981\u5185\u5bb9\u5305\u62ec\uff1a1) Framebuffer\u6982\u5ff5\u53ca\u64cd\u4f5c\u6b65\u9aa4\uff1a\u6253\u5f00\u8bbe\u5907\u3001\u83b7\u53d6\u53c2\u6570\u3001\u5185\u5b58\u6620\u5c04\u3001\u5199\u5165\u989c\u8272\u503c\u7b49\uff1b2) \u57fa\u672c\u7ed8\u56fe\u51fd\u6570\u5b9e\u73b0\uff1a\u5305\u62ec\u753b\u70b9\u3001\u6a2a\u7ebf\u3001\u7ad6\u7ebf\u3001\u77e9\u5f62\u3001\u5706\u7b49\u7b97\u6cd5\uff1b3) \u56fe\u50cf\u5904\u7406\uff1aBMP\u6587\u4ef6\u5934\u89e3\u6790\u548c\u50cf\u7d20\u7ed8\u5236\uff1b4) \u6587\u5b57\u663e\u793a\uff1a\u901a\u8fc7\u5b57\u6a21\u6570\u636e\u5b9e\u73b0\u5b57\u7b26\u6e32\u67d3\u3002\u5173\u952e\u70b9\u5728\u4e8e\u901a\u8fc7mmap\u6620\u5c04\u663e\u5b58\u540e\u76f4\u63a5\u64cd\u4f5c\u50cf\u7d20\u6570\u636e\uff0c\u652f\u6301RGB888\u548cRGB565\u4e24\u79cd\u683c\u5f0f\uff0c\u5e76\u63d0\u4f9b\u4e86\u4ece\u7b80\u5355\u56fe\u5f62\u5230\u590d\u6742\u56fe\u50cf\u3001\u6587\u5b57\u7ed8\u5236\u7684\u5b8c\u6574\u89e3\u51b3\u65b9\u6848\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/57769.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-15T11:30:35+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/57769.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/57769.html\",\"name\":\"Linux\u9ad8\u7ea7\u7f16\u7a0b-framebuffer - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-15T11:30:35+00:00\",\"dateModified\":\"2025-08-15T11:30:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/57769.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/57769.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/57769.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\u9ad8\u7ea7\u7f16\u7a0b-framebuffer\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux\u9ad8\u7ea7\u7f16\u7a0b-framebuffer - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/57769.html","og_locale":"zh_CN","og_type":"article","og_title":"Linux\u9ad8\u7ea7\u7f16\u7a0b-framebuffer - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb558\u6b21\uff0c\u70b9\u8d5e27\u6b21\uff0c\u6536\u85cf19\u6b21\u3002\u672c\u6587\u4ecb\u7ecd\u4e86Linux\u5e27\u7f13\u51b2(Framebuffer)\u6280\u672f\u53ca\u5176\u56fe\u5f62\u7ed8\u5236\u5b9e\u73b0\u3002\u4e3b\u8981\u5185\u5bb9\u5305\u62ec\uff1a1) Framebuffer\u6982\u5ff5\u53ca\u64cd\u4f5c\u6b65\u9aa4\uff1a\u6253\u5f00\u8bbe\u5907\u3001\u83b7\u53d6\u53c2\u6570\u3001\u5185\u5b58\u6620\u5c04\u3001\u5199\u5165\u989c\u8272\u503c\u7b49\uff1b2) \u57fa\u672c\u7ed8\u56fe\u51fd\u6570\u5b9e\u73b0\uff1a\u5305\u62ec\u753b\u70b9\u3001\u6a2a\u7ebf\u3001\u7ad6\u7ebf\u3001\u77e9\u5f62\u3001\u5706\u7b49\u7b97\u6cd5\uff1b3) \u56fe\u50cf\u5904\u7406\uff1aBMP\u6587\u4ef6\u5934\u89e3\u6790\u548c\u50cf\u7d20\u7ed8\u5236\uff1b4) \u6587\u5b57\u663e\u793a\uff1a\u901a\u8fc7\u5b57\u6a21\u6570\u636e\u5b9e\u73b0\u5b57\u7b26\u6e32\u67d3\u3002\u5173\u952e\u70b9\u5728\u4e8e\u901a\u8fc7mmap\u6620\u5c04\u663e\u5b58\u540e\u76f4\u63a5\u64cd\u4f5c\u50cf\u7d20\u6570\u636e\uff0c\u652f\u6301RGB888\u548cRGB565\u4e24\u79cd\u683c\u5f0f\uff0c\u5e76\u63d0\u4f9b\u4e86\u4ece\u7b80\u5355\u56fe\u5f62\u5230\u590d\u6742\u56fe\u50cf\u3001\u6587\u5b57\u7ed8\u5236\u7684\u5b8c\u6574\u89e3\u51b3\u65b9\u6848\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/57769.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-15T11:30:35+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/57769.html","url":"https:\/\/www.wsisp.com\/helps\/57769.html","name":"Linux\u9ad8\u7ea7\u7f16\u7a0b-framebuffer - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-15T11:30:35+00:00","dateModified":"2025-08-15T11:30:35+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/57769.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/57769.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/57769.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Linux\u9ad8\u7ea7\u7f16\u7a0b-framebuffer"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/57769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=57769"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/57769\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=57769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=57769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=57769"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=57769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}