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;//图像的高
相关文档:
1.求下面函数的返回值(微软)
int func(x)
{
int countx = 0;
while(x)
{
countx ++;
x = x&(x-1);
......
先是内核驱动程序:
#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 ......
// 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 ......
//为了和DSP兼容,TSint64和TUint64设置成TSint40和TUint40一样的数
//结果VC中还是认为是32位的,显然不合适
//typedef signed long int TSint64;
//typedef unsigned long int TUint64; &nb ......
51单片机 Keil C 延时程序的简单研究
by: InfiniteSpace Studio/isjfk, 1.21.2004
任何人都可以在注明原作者和出处的前提下随意转载这篇文章,但不得用于商业目的。
......