作者tobyhuang (平平)
看板b95902HW
標題鋼彈
時間Thu Nov 2 23:57:54 2006
請問助教給的example的程式碼
#include <stdio.h>
#include "bmp.h"
int main(void)
{
unsigned char *bytes;
BITMAPINFO *info; //file header
int height;
int width;
bytes=LoadDIBitmap("red.bmp", &info);
height=info->bmiHeader.biHeight;
width=info->bmiHeader.biWidth;
bytes[0]=255; //change left-down pixel to white
SaveDIBitmap("out.bmp", info, bytes);
return (0);
}
要直接複製到主程式中嗎??
還是要更改啥麼??
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 59.120.153.129
1F:推 ferng1021:請參考這個example 寫出自己的code 11/03 00:00
2F:→ ferng1021:如果有需要 可以複製example裡面的任何東西 11/03 00:04