c语言实现bitmap

本文介绍如何使用C语言创建并操作Bitmap,已验证功能正常,提供了源代码下载,适用于需要位图操作的场景,可按需扩展字节序转换等功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

c语言实现的bitmap,功能可用,已经过测试,如果需要其他操作(字节序转换、清空等),可自行添加。

大家可在此下载源代码:下载源代码

/* bitmap.h
 *
 * Copyright (C) 2013, 2013 chashen. All Rights Reserved.
 * Written by chashen
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version
 * 2 of the License, or (at your option) any later version.
 */

#ifndef _BITMAP_H_
#define _BITMAP_H_

typedef struct tagBitmap
{
    unsigned int uiMemSize;      /* bitmap所占内存大小,不包括本头部 */
    unsigned int uiMaxBitID;     /* 最大有效位 */
    unsigned char aucPtr[0];     /* bitmap数据区 */
}BITMAP_S;

BITMAP_S *Bitmap_Create(unsigned int uiMaxBitID);
void Bitmap_Destroy(BITMAP_S *pstBitmap);
void Bitmap_Set(BITMAP_S *pstBitmap, unsigned int uiPos);
void Bitmap_Reset(BITMAP_S *pstB
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值