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;//图像的高
相关文档:
先是内核驱动程序:
#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];
& ......
// SnakeMatrix.cpp : Defines the entry point for the console application.
// Create by Xianyi.Ye, May 4,2010
#include "stdafx.h"
#include <iostream.h>
/*
Question: Print a Sanke Matrix as following
i\j 1 2 3 4 5 6
1 1 2 9 10 25 26
2 4 3 8 11 24 27
3 5 6 7 12 23 28
4 16 15 14 ......
1.时间表示
在程序当中,我们经常要输出系统当前的时间,比如我们使用date命令的输出结果.这个时候我们可以使用下面两个函数:
#include <sys/time.h>
time_t time(time_t *tloc);
char *ctime(const time_t *clock);
time函数返回从1970年1月1日0 ......
选两个比较有代表性的函数
首先下载安装sdk,将其中的sde.dll,pe.dll和sg.dll拷贝过来
使用如下的代码,指定dll后直接调用其中的函数,
/// <summary>
/// Sets the value for a small integer column.
/// </summary>
[DllImport(".\\sde91.dll", SetLastError = true, ......