关闭

X Window研究笔记(19)

标签: c#c
3729人阅读 评论(0) 收藏 举报
分类:
X Window研究笔记(19)

转载时请注明出处和作者联系方式
作者联系方式:李先静 <xianjimli at hotmail dot com>

19.X Window中的图片文件Pixmap

X Window自己定义了一种图片文件格式,叫做pixmap,与众不同的是,它完全以文本文件格式存放图片内容,而不是采用通常的二进制格式。下面一个图片的例子:

static char* Busy1[] = {
"32 32 6 1 15 16",
"  c None",
"! c #101010",
"# c #C0C0C0",
"$ c #808080",
"% c #000000",
"& c #FFFFFF",
"                                ",
"                                ",
"                                ",
"                                ",
"        !!!!!!!!!!!!!!!         ",
"        %%%%%%%%%%%%%%%         ",
"         !&&&&&&&&&&&!          ",
"         !&&&&&&&&&&&!          ",
"         !&&&&&&&&&&&!          ",
"         !$$&$&&&$&$!!          ",
"         !$$$$%&%!$!$!          ",
"          !$$$!$!!!$!           ",
"           !&$$!$$$!            ",
"            !$$$!$!             ",
"             !$$$!              ",
"              !$!               ",
"              !$!               ",
"             !$&$!              ",
"            !$&$&$!             ",
"           !$&&$$&$!            ",
"          !$&&&$#&&$!           ",
"         !$&&&#$##$&!!          ",
"         !&&&&&$&#&&&!          ",
"         !&&&&$$$&$&$!          ",
"         !&&&$$!&$&&&!          ",
"         !$$$$!%!$!$!!          ",
"        %%%%%%%%%%%%%%%         ",
"        !!!!!!!!!!!!!!!         ",
"                                ",
"                                ",
"                                ",
"                                "}
;


(怎么样,它还反应出实际图片的形状呢。)

这种图片文件的好处在于它是文本格式的,具有更好的可移植性,不用考虑字节顺序和对齐的问题,它的限制在于它的体积庞大,也不适用于存放颜色数多的图片。

(待续)


 
0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:3906500次
    • 积分:46963
    • 等级:
    • 排名:第71名
    • 原创:664篇
    • 转载:66篇
    • 译文:1篇
    • 评论:3099条
    最新评论