linux开发板显示动态图片,开发板上显示图片

参考网址:  http://blog.csdn.net/z1179675084/article/details/14645359

http://hi.baidu.com/guoggn/item/636e08145b5d39fc746a8461

http://blog.chinaunix.net/uid-26669729-id-3077015.html

http://blog.csdn.net/luxiaoxun/article/details/7622988

关键:

1)字节对齐问题__attribute__((packed))   最大字节对齐

2) _attribute__((packed))的作用是告诉编译器取消结构在编译过程中的优化对齐

3) 字节数的统计

#include

#include

#include

#include

#include

#include /*map头文件*/

#include

#include

#include

#include

//14byte文件头

typedef struct

{

unsigned char cfType[2];//文件类型,"BM"(0x4D42)

unsigned int cfSize;//文件大小(字节)

unsigned int cfReserved;//保留,值为0

unsigned int cfoffBits;//数据区相对于文件头的偏移量(字节)

}__attribute__((packed)) BITMAPFILEHEADER;

/*_attribute__((p

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值