c 语言实现24位bmp图片加载,读写,放大缩小
原文链接地址:http://hi.baidu.com/erfolgreich/blog/item/ce94dbad02c0c3f7faed5010.html
c 语言实现24位bmp图片加载,读写,放大缩小
可用 microsoft visual c++ 6.0 建立Win32 Console Application 工程,添加如下.cpp
2010-04-30 10:24
发现好多人网上查找c 语言版本的bmp图像读取,保存,放大,缩小程序,很难找到完整的。 现在将自己写的贴出来 供大家学习参考交流。转载请标明出处,尊重作者劳动成果。
/**********************************************************
作者:fankaipeng
时间:2010-04-27
文件名称:zoombmp.cpp
描述:c 语言实现24位bmp图片读写,放大缩小。
开发工具 microsoft visual c++
开发平台 windows
***********************************************************/
#include <windows.h>
#include <stdio.h>
#define FXZOOMRATIO 1.5 //x轴放大倍数
#define FYZOOMRATIO 1.5 //y轴放大倍数
unsigned char *pBmpBuf; //读入图像数据的指针
unsigned char *pNewBmpBuf;
int bmpWidth;//图像的宽
int bmpHeight;//图像的高
相关文档:
格式输出:
printf(格式控制, 输出表列);
%d 十进制数 %md m为指定的宽度 若数据位数小于m,则左端补以空格;若大于m,则按实际位数输出
%ld 长整型数据 %mld 指定字段宽度
%o 八进制整数形式 %mo
%x 十六进制整数形式 %mx
%u unsigned型数据,它也可用%o或%x格式输出
%c 一个字符 ......
先是内核驱动程序:
#include <linux/module.h>//具体的头文件位置为/opt/FriendlyARM/mini2440/linux-2.6.29/include/linux/*.h
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/poll.h>
#include <l ......
[root@ocsser file]# cat array-05.c
//this is a program for two juzheng xiangcheng.
#include <stdio.h>
int main(){
int i,j,m,n;
int g,k,f;
int c[5][6];
& ......
<select class="wellId" id="gasOriginWellId" name="gasOriginWellId" value="${mechWellForm.gasOriginWellId}" index="true">
< ......
镜头总是被固定在标准的镜座上,镜座包围着传感器CCD,镜头与CCD受光面保持着一定的距离,使得镜头的像面与其一致,以使镜头对焦微调后成像最清晰。有几种标准的安装接口:C接口、CS接口和S接口。
所有的摄象机镜头均是螺纹接口的,CCD摄象机的镜头安装有两种工业标准,即C安装座和CS安装座。两者螺纹部分相同,但两者从镜 ......