Trying to understand zlib/deflate in PNG files

前端 未结 2 1566
误落风尘
误落风尘 2020-12-16 16:58

I\'m currently in the middle of writing a small PNG image I/O library myself for learning purposes. My problem is the following:

I created a small PNG only 2 by 2 pi

2条回答
  •  忘掉有多难
    2020-12-16 17:55

    In case this helps, here is a disassembly of the IDAT chunk contents:

    ! infgen 2.2 output
    !
    zlib
    !
    last
    dynamic
    count 257 2 18
    code 1 1
    code 2 2
    code 18 2
    lens 1
    zeros 138
    zeros 116
    lens 2 2 1 1
    ! litlen 0 1
    ! litlen 255 2
    ! litlen 256 2
    ! dist 0 1
    ! dist 1 1
    literal 0 0 0 0 255 0 0 0 0 0 255 0 255 0
    end
    !
    adler
    

    You can get the infgen source code here.

提交回复
热议问题