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
:
: 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.
-[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]
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
:
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]
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]
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]