interface IendChunk
extends Omit<PngChunkUnknown, "type" | "data">

Refined IEND (Image End) chunk structure.

The IEND chunk marks the end of the PNG datastream. It has no data field and must be the last chunk in the file.

Examples

Example 1

import { assertEquals } from "@std/assert";
import type { IendChunk } from "@binstruct/png";

const iend: IendChunk = {
  length: 0,
  type: "IEND",
  crc: 0xAE426082, // Standard IEND CRC
};

assertEquals(iend.type, "IEND");
assertEquals(iend.length, 0);

Properties

type: "IEND"

Chunk type identifier, always "IEND"

crc: number

CRC checksum (always the same for IEND since data is empty)

Usage

import { type IendChunk } from ".";