 defmodule Imagineer.Image.PNG.Chunk do
-  alias Imagineer.Image.PNG.Chunk
+  alias Imagineer.Image.PNG.Chunk.Encoders
+  alias Imagineer.Image.PNG.Chunk.Decoders
   require Logger
   import Chunk.Helpers
 

  end

  # Required headers
  encode_chunk @ihdr_header, with: Chunk.Encoders.Header
  encode_chunk @plte_header, with: Chunk.Encoders.Palette
  encode_chunk @idat_header, with: Chunk.Encoders.DataContent
  encode_chunk @iend_header, with: Chunk.Encoders.DataContent

  encode_chunk @trns_header, with: Chunk.Encoders.Transparency
  encode_chunk @bkgd_header, with: Chunk.Encoders.Background
  encode_chunk @gama_header, with: Chunk.Encoders.Gamma

  defp verify_crc!(header, content, valid_crc) do
    unless :erlang.crc32(header <> content) == valid_crc do

  end

  # Required headers
  decode_chunk @ihdr_header, with: Decoders.Header
  decode_chunk @plte_header, with: Decoders.Palette
  decode_chunk @idat_header, with: Decoders.DataContent
  decode_chunk @iend_header, with: Decoders.End

  # Auxillary headers
  decode_chunk @bkgd_header, with: Decoders.Background
  decode_chunk @phys_header, with: Decoders.PhysicalPixelDimensions
  decode_chunk @itxt_header, with: Decoders.Text
  decode_chunk @gama_header, with: Decoders.Gamma
  decode_chunk @trns_header, with: Decoders.Transparency

  defp decode_chunk(unknown_header, _content, image) do
    Logger.debug("Skipping unknown header #{unknown_header}")
