1.XBM格式是一种可读的文本格式保存图像,文件可用文本编辑器打开,类似如下
#define test_width 20
#define test_height 20
static unsigned char test_bits[] = {
0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0xFE, 0xFF, 0x0F};
2.使用PHP创建XBM图像是要注意****imagecreatetruecolor*******,而不要用imagecreate.
3.使用PHP读取XBM图像使用imagecreatefromxbm,
4.特殊注意,那个创建方法. 如果使用imagecreate创建的xbm,在创建时,不会有任何错误,但到了读取的时候,是读取不出来的.
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/bian-cheng-ji-chu/103776.html