
图形技术
文章平均质量分 64
hhzczhh
这个作者很懒,什么都没留下…
展开
-
C语言读取和显示BMP文件
<br />http://bbs.61job.cn/space/viewspacepost.aspx?postid=89<br /> <br />在TC2.0下,隶属于16位子系统,所以int是2字节,long是4字节,char是1字节。绘图系统模式是VGA,颜色当然也很有限,所以读取bmp像素后需要把像素颜色转换为“最近”的已有VGA颜色。用int GetColor(int r,int g,int b)实现返回一个颜色值(color code)。用putpixel(int x,int y,int colo原创 2010-06-26 14:17:00 · 387 阅读 · 0 评论 -
CxImage安装配置与使用
<br />一、安装配置<br />1.下载CxImage类库<br />地址:http://www.codeproject.com/bitmap/cximage.asp<br />2.解压压缩包,并编译Demo2/Console.dsw<br />3.编译完成后搜索*.lib文件,一共搜索出10个文件,把它们复制到你的工程目录中(任意)<br />它们分别为:CxImage.lib Jpeg.lib png.lib Tiff.lib jbig.lib zlib.lib j2k.lib cximagecrt原创 2010-06-07 01:49:00 · 1214 阅读 · 1 评论 -
简单文本压缩
#include #include bool compress(char *str){ char *p=str,c; int cnt,i=0; if(!str)return false; p = str; while(*p != '/0'){ cnt = 1; while(*p == *(p+1)){ cnt++; p++; } if(cnt != 1){ c = *p; sprintf(&str[i],"%d",cnt); i += strlen(&str[i]); str[原创 2011-03-12 00:58:00 · 258 阅读 · 0 评论