# # The EBNF grammar for the PNG-1.2 standard chunks in PNG datastreams # Version: 0.4 # Author: Cosmin Truta, Jan 2001 # Contributing author: Glenn Randers-Pehrson # png_standalone_datastream ::= png_signature png_datastream png_signature ::= "\211PNG\r\n\32\n" png_datastream ::= IHDR png_image_info png_image_data png_general_info IEND png_image_info ::= png_image_color_info (PLTE)? png_image_noncolor_info png_image_data ::= (IDAT)+ png_general_info ::= (png_general_info_chunk)* png_image_color_info ::= (png_color_info_chunk | png_general_info_chunk | sBIT | pHYs | sPLT)* png_image_noncolor_info ::= (png_general_info_chunk | bKGD | hIST | tRNS | pHYs | sPLT)* png_color_info_chunk ::= cHRM | gAMA | iCCP | sRGB png_general_info_chunk ::= tIME | iTXt | tEXt | zTXt