PNG Format - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

PNG Format

Hi,

We are trying to build a PNG Encoder. We have problems understanding how is the IDAT chunk built. We understand that the first 4 bytes are the length,the second 4 bytes are the IDAT signature, then raw data and of course 4 bytes of CRC at the end. Our problem is that the first 7 bytes in the data do not represent pixel indexing, but something else, and we can't figure out what. Any ideas what those bytes might represent?

Any help would be appreciated

Thank You,
Yuval

Comments

  • IDKIDK Posts: 1,784Member
    : Hi,
    :
    : We are trying to build a PNG Encoder. We have problems understanding how is the IDAT chunk built. We understand that the first 4 bytes are the length,the second 4 bytes are the IDAT signature, then raw data and of course 4 bytes of CRC at the end. Our problem is that the first 7 bytes in the data do not represent pixel indexing, but something else, and we can't figure out what. Any ideas what those bytes might represent?
    :
    : Any help would be appreciated
    :
    : Thank You,
    : Yuval
    :

    It could be in true color, which is like:
    0xFF 0xFF 0xFF
    The first byte is red, the next is green and the last is blue. This could be the other way around.

    The data may also be compressed, but I don't really know.
  • SephirothSephiroth Fayetteville, NC, USAPosts: 1,035Member
    Check out www.wotsit.org for almost any file format.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]

  • gautamgautam Posts: 642Member
    Hi,

    I am no expert in the PNG file format -
    Check out the Table in the PNG file format here
    http://www.w3.org/TR/2003/REC-PNG-20031110/#4Concepts.FormatTypes

    Maybe you are getting a IHDR chunk and the PLTE chunk. However as per the table it should be only in the beginning and probably PLTE and IHDR together would be more that 7 bytes.

    It might also be some data stream you could ignore maybe.

    Or maybe its an older version of PNG file format and needs to be interpreted differently.

    In the end you might want to see how libpng deals with it.

    Hope this helps.

    : Hi,
    :
    : We are trying to build a PNG Encoder. We have problems understanding how is the IDAT chunk built. We understand that the first 4 bytes are the length,the second 4 bytes are the IDAT signature, then raw data and of course 4 bytes of CRC at the end. Our problem is that the first 7 bytes in the data do not represent pixel indexing, but something else, and we can't figure out what. Any ideas what those bytes might represent?
    :
    : Any help would be appreciated
    :
    : Thank You,
    : Yuval
    :

  • adamstuart07adamstuart07 Posts: 3Member
    Hello Friend

    PNG is Stands for Portable Network Graphics.

    PNG was created to improve upon and replace GIF (Graphics Interchange Format) as an image-file format not requiring a patent license. The initialism PNG can also be interpreted as a recursive initialism for "PNG's Not GIF".
    PNG file always use an extension .png....
    [url=http://windows7.igennie.net/windows7-updates.html][b]Updates To Windows 7[/b][/url] || [url=http://www.igennie.net/microsoft-support.html][b]Microsoft service support[/b][/url]
  • adamstuart07adamstuart07 Posts: 3Member
    Hello Friend

    PNG is Stands for Portable Network Graphics.
    PNG was created to improve upon and replace GIF (Graphics Interchange Format) as an image-file format not requiring a patent license. The initialism PNG can also be interpreted as a recursive initialism for "PNG's Not GIF".
    PNG file always use an extension .png....

    [url=http://windows7.igennie.net/windows7-updates.html][b]Updates To Windows 7[/b][/url] || [url=http://www.igennie.net/microsoft-support.html][b]Microsoft service support[/b][/url]
  • adamstuart07adamstuart07 Posts: 3Member
    Hello Friend

    PNG is Stands for Portable Network Graphics.
    PNG was created to improve upon and replace GIF (Graphics Interchange Format) as an image-file format not requiring a patent license. The initialism PNG can also be interpreted as a recursive initialism for "PNG's Not GIF".
    PNG file always use an extension .png....

    [url=http://windows7.igennie.net/windows7-updates.html][b]Updates To Windows 7[/b][/url] || [url=http://www.igennie.net/microsoft-support.html][b]Microsoft service support[/b][/url]
Sign In or Register to comment.