不用GD库生成当前时间的PNG格式图象的程序
filter byte: 0 = none // RGB bytes for the line // the scanline is compressed with "zlib", method 8 (RFC-1950): // compression method/flags code: 1 byte ($78 = method 8, 32k window) // additional flags/check bits: 1 byte ($01: FCHECK = 1, FDICT = 0, FLEVEL = 0) // compressed data blocks: n bytes // one block (RFC-1951): // bit 0: BFINAL: 1 for the last block // bit 1 and 2: BTYPE: 0 for no compression // next 2 bytes: LEN (LSB first) // next 2 bytes: one''s complement of LEN // LEN bytes uncompressed data // check value: 4 bytes (Adler-32 checksum of the uncompressed data) // $len = ($sx * 3 + 1) * $sy; $data = pack("c*", 0x78, 0x01, 1, $len & 255, ($len >> 8) & 255, 255 - ($len & 255), 255 - (($len >> 8) & 255)); $start = strlen($data); $i2 = 0; for ($h = 0; $h < $sy; $h++) { $data .= chr(0); for ($w = 0; $w < $sx * 3; $w++) { $data .= $pixels[$i2++]; } }
$data .= chr(($adler >> 24) & 255); |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |