• X Window研究笔记(19)


    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",
    "                                ",
    "                                ",
    "                                ",
    "                                ",
    "        !!!!!!!!!!!!!!!         ",
    "        %%%%%%%%%%%%%%%         ",
    "         !&&&&&&&&&&&!          ",
    "         !&&&&&&&&&&&!          ",
    "         !&&&&&&&&&&&!          ",
    "         !$$&$&&&$&$!!          ",
    "         !$$$$%&%!$!$!          ",
    "          !$$$!$!!!$!           ",
    "           !&$$!$$$!            ",
    "            !$$$!$!             ",
    "             !$$$!              ",
    "              !$!               ",
    "              !$!               ",
    "             !$&$!              ",
    "            !$&$&$!             ",
    "           !$&&$$&$!            ",
    "          !$&&&$#&&$!           ",
    "         !$&&&#$##$&!!          ",
    "         !&&&&&$&#&&&!          ",
    "         !&&&&$$$&$&$!          ",
    "         !&&&$$!&$&&&!          ",
    "         !$$$$!%!$!$!!          ",
    "        %%%%%%%%%%%%%%%         ",
    "        !!!!!!!!!!!!!!!         ",
    "                                ",
    "                                ",
    "                                ",
    "                                "}
    ;


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

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

    (待续)


     
  • 相关阅读:
    OllyUni.dll
    系统修改利器XueTr
    dubbo+zipkin调用链监控(二)
    Kafka Manager
    简易RPC框架-SPI
    Spring Cache扩展:注解失效时间+主动刷新缓存(二)
    从头开始搭建一个Spring boot+ActiveMQ高可用分布式环境
    简易RPC框架-熔断降级机制
    简易RPC框架-代理
    转:一篇讲线上优化查 CPU的脚本
  • 原文地址:https://www.cnblogs.com/zhangyunlin/p/6167668.html
Copyright © 2020-2023  润新知