博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
12132
阅读量:4521 次
发布时间:2019-06-08

本文共 1122 字,大约阅读时间需要 3 分钟。

#include
#include
#include
#include
void main(){ int i,j,k,m; int width,height,start,world; int *bmp,*Lcount; bool *Lflag; FILE *fp; if((fp=fopen("in1.bmp","rb"))==NULL){ printf("文件打开失败"); return; } fseek(fp,10L,0); fscanf(fp,"%4c",&start); // 4c表示该数据占4个字节// printf("start = %d\n",start); fseek(fp,18,0); fscanf(fp,"%4c",&width);// printf("width = %d\n",width); fseek(fp,22,0); fscanf(fp,"%4c",&height); // printf("height = %d\n",height); bmp = (int*)malloc((width+2)*sizeof(int)); memset(bmp,0,(width+2)*sizeof(int)); Lcount = (int*)malloc(width*sizeof(int)); memset(Lcount,0,width*sizeof(int)); Lflag = (bool*)malloc(width*sizeof(bool)); memset(Lflag,0,width*sizeof(bool)); Lcount--; Lflag--; fseek(fp,start,0); world = ( width%32 ? width/32+1 : width/32 )*4; int last,i1,i2,i3; int eCount = 0 ; for(i=0 ; i
= 0 && k<=width ; m-- ){ if( !( 1<

 

转载于:https://www.cnblogs.com/wwjyt/p/3181082.html

你可能感兴趣的文章
傻瓜式硬盘重装win7系统图文加视频教程
查看>>
BZOJ 1607 [Usaco2008 Dec]Patting Heads 轻拍牛头:统计 + 筛法【调和级数】
查看>>
如果一个人请优雅的活着。
查看>>
验证码
查看>>
Django缓存配置
查看>>
Ubuntu下安装 Mysql
查看>>
LeetCode--Reverse Integer
查看>>
PHP_APC+Ajax实现的监视进度条的文件上传
查看>>
计算机网络课堂笔记3.29
查看>>
word2vec----CBOW
查看>>
衰减学习率真的有用吗?
查看>>
ORACLE 建库过程总结
查看>>
Ogre1.8.1 Basic Tutorial 6 - The Ogre Startup Sequence
查看>>
构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(36)-文章发布系统③-kindeditor使用...
查看>>
c# Winform 开发分屏显示应用程序
查看>>
canvas刮奖
查看>>
javascript 模拟滚动 隐藏滚动条
查看>>
手把手教你使用 Clion 开发 Linux C++ 项目
查看>>
阿里巴巴卖空阿里巴巴入股新浪微博抑制投资者卖空行为
查看>>
分析打开hdu 3335 (最小路径覆盖)
查看>>